Forum Replies Created

Viewing 15 posts - 16 through 30 (of 54 total)

  • RE: Extract phone numbers from a string

    There will definitely be some letters in between the phone numbers.
    So, from this:
     'text text 123 45 - 6789101112 text text text 1 2 3 4 5 - 6789101112...

  • RE: Extract phone numbers from a string

    I've been trying something like this:


    DECLARE @STR VARCHAR(MAX)
    DECLARE @validchars VARCHAR(MAX)

    SET @STR = 'text text 12 4 5 -...

  • RE: Extract phone numbers from a string

    Yes, I understand!
    The way to identify the beginning and end, if I would go char by char in a string, would be: at the first occurrence of a number,...

  • RE: Extract phone numbers from a string

    It is possible, yes, unfortunately!
    But if it's not 10 consecutive numbers (with/ without the space or '-') then it should not be returned.

    Also, there might be multiple...

  • RE: Extract phone numbers from a string

    Thank you so much for your answer!

    The problem is that when I return it I need to return with all the special characters in it. Like  '123 45 -...

  • RE: Urgent - How to fetch Drop down values stored in XML Column in SQL 2008

    Hello,

    You could try to make this one dynamic, in order to not be limited by the number of <Item>

    DECLARE @path varchar(50) = 'c:\sql_server_central\sql1.xml'

    CREATE TABLE Tmp (id INT, instructions XML)

    DECLARE @sqlCommand1...

  • RE: Help Needed in Processing Data

    I had a situation where I had to move a big amount of data from a certain number of tables from one server to another (into a different database structure...

  • RE: Cache Manipulation

    I have actually set up a maintenance plan, for indexes and statistics, that works pretty well. And I don't really have performance issues at this point. But as I was...

  • RE: Cache Manipulation

    Thank you for both your replies!

    I am not attempting to solve a actual situation at this point. It was more of a curiosity, maybe to be implemented, to know if...

  • RE: Cache Manipulation

    Thank you so much for the reply! I will search a bit for the HINTs and test on some of my queries.

  • RE: Cache Manipulation

    Thank you for the reply!

    I was thinking more in terms of queries or stored procedures, to be able to store a certain plan of execution in the cache and force...

  • RE: Need to check which query is taking longer

    for me, basically instant

  • RE: Need to check which query is taking longer

    You can try this query:

    SELECT DISTINCT TOP 10

    t.TEXT QueryName,

    s.execution_count AS ExecutionCount,

    s.max_elapsed_time AS MaxElapsedTime,

    ISNULL(s.total_elapsed_time / s.execution_count, 0) AS AvgElapsedTime,

    s.creation_time AS LogCreatedOn,

    ISNULL(s.execution_count / DATEDIFF(s, s.creation_time, GETDATE()), 0) AS FrequencyPerSec

    FROM sys.dm_exec_query_stats s

    CROSS APPLY...

  • RE: File Size from T-SQL

    I don't have a lot of knowledge of Powershell.

    Is it possible to query a path in another server?

    And also, to insert the results into a certain table?

    Thank you!

  • RE: File Size from T-SQL

    Hi,

    First thing I tried was xp_cmdshell. That blocked everything for me as it took a lot of time and resources. Than, using xp_dirtree I populated my table with all the...

Viewing 15 posts - 16 through 30 (of 54 total)