Forum Replies Created

Viewing 15 posts - 2,911 through 2,925 (of 3,957 total)

  • RE: Select table names from queries

    Lowell (8/30/2012)


    i get very few false positives when i go after my procedure and function definitions using that technique:

    SELECT definition,T1.*,T2.* from sys.sql_modules

    CROSS APPLY dbo.DelimitedSplit8K(definition,' ') T1

    CROSS APPLY dbo.DelimitedSplit8K(definition,' ')...

  • RE: Select table names from queries

    SQLHeap (8/30/2012)


    Pretty clever dwain, thanks for your input!

    Hey! Almost missed your thanks there! 😛 You're very welcome.

    And don't listen to ChrisM@Work - he's just a grumpy old,...

  • RE: Select table names from queries

    ChrisM@Work (8/30/2012)


    dwain.c (8/29/2012)


    RBarryYoung (8/29/2012)


    Unless the queries all strictly follow the same very simple format, this is going to fall somewhere between "Impossible" and "Incredibly Hard" to do in SQL.

    If the...

  • RE: Unique runs

    Eugene Elutin (8/30/2012)


    Search for "OMG" In J.M. article:

    http://www.sqlservercentral.com/articles/T-SQL/68467/

    It does explain the problem in details and gives good example.

    Ah yes, the bible on this subject. It appears Jeff has revised...

  • RE: Unique runs

    sjsubscribe (8/30/2012)


    Dwain, works perfectly. Thanks very very much.

    First off, I never thought about quirky update though I used it before.

    Second, your code ran in 5.1 seconds for 300K records...

  • RE: Unique runs

    First of all, and a good thing for you because I suck at them, I don't think this is a gaps and islands problem. It looks more like a...

  • RE: Select table names from queries

    RBarryYoung (8/29/2012)


    Unless the queries all strictly follow the same very simple format, this is going to fall somewhere between "Impossible" and "Incredibly Hard" to do in SQL.

    If the queries are...

  • RE: Select table names from queries

    Well, one thing that you could do if you were so inclined is to add the schema prefix (e.g., dbo.) to each referenced table in each query.

    This is supposed to...

  • RE: Extract 5 digit and 3 digit numerics

    Very messy, but kinda fun!

    ;WITH Tally (n) AS (

    SELECT TOP 200 ROW_NUMBER() OVER (ORDER BY (SELECT NULL))

    ...

  • RE: Are the posted questions getting worse?

    Jo Pattyn (8/29/2012)


    How to inform developers that there are still slow/congested networks out there? About select * from remotesnailnetwork.matter.listed.particle finding one specific particle without a where clause. QoS?

    *edit* Not an...

  • RE: Weird Requirement... Multiple Left Joins? Am I missing something?

    Gus,

    That's an interesting point on the IOs but in the below test harness (5 docs) it still runs pretty fast, although clearly not as fast as Mark's.

    Create table #Doc (

    DocNum...

  • RE: How to update two tables data with JOIN in Single query

    ChrisM@Work (8/29/2012)


    dwain.c (8/29/2012)


    Yep. That's the same error I got.

    Whatever it is saying, it's odd.

    It refers to "fields" too - and took me ages to call them "columns" when I...

  • RE: How to update two tables data with JOIN in Single query

    ChrisM@Work (8/29/2012)


    dwain.c (8/29/2012)


    Yep. That's the same error I got.

    Whatever it is saying, it's odd.

    It refers to "fields" too - and took me ages to call them "columns" when I...

  • RE: How to update two tables data with JOIN in Single query

    Yep. That's the same error I got.

    Whatever it is saying, it's odd.

  • RE: increment values on day basis on column

    ChrisM@Work (8/29/2012)


    dwain.c (8/29/2012)


    Had to make a slight correction to my prior post and add a question.

    -- casting GETDATE as INT gives different results before and after midday ...

Viewing 15 posts - 2,911 through 2,925 (of 3,957 total)