Forum Replies Created

Viewing 15 posts - 2,896 through 2,910 (of 3,957 total)

  • RE: Select table names from queries

    Eugene Elutin (8/31/2012)


    dwain.c (8/31/2012)


    Eugene,

    Thanks for the suggestions on the comments. I'll run them through and try to improve it (I have some other ideas for it anyway).

    One question though....

  • RE: Select table names from queries

    Eugene,

    Thanks for the suggestions on the comments. I'll run them through and try to improve it (I have some other ideas for it anyway).

    One question though. If your...

  • RE: error handling

    You may also want to look into XACT_STATE(). You can call this function to determine whether COMMIT will run without throwing the particular error you posted.

  • RE: Why Index?

    Shadab Shah (8/30/2012)


    Hi,

    Basically indexes increases the performance will searching which is nullified while inserting . Now when the time required for inserting is large it means that the total turnaround...

  • RE: Select table names from queries

    RBarryYoung (8/30/2012)


    dwain.c (8/30/2012)


    ...

    I just hope I got the line terminator character (CHAR(13)?) right (didn't look it up).

    The line terminator can be any of CHAR(13), or CHAR(10) or CHAR(13)+CHAR(10).

    Ugh! Well...

  • RE: Employee Hierarchy

    Jeff Moden (8/30/2012)


    Please see the following. It's pretty simple to do once you know how...

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

    I was initially expecting to have to use the standard rCTE adjacency list traversal, but...

  • RE: Adding Seconds to Time field

    Jeff Moden (8/30/2012)


    dwain.c (8/30/2012)


    Jeff Moden (8/30/2012)


    Like I said... serious problem.

    Jeff - I don't get it (no coffee yet this morning).

    If it starts at 23:59:00 and ends at 00:01:00 (120 seconds),...

  • RE: Select table names from queries

    I don't want anyone to think I'm getting defensive about my approach - I am not.

    But I've taken Eugene's comments about comments 🙂 into account and also eliminated VIEWs, SPs...

  • RE: Adding Seconds to Time field

    Jeff Moden (8/30/2012)


    Like I said... serious problem.

    Jeff - I don't get it (no coffee yet this morning).

    If it starts at 23:59:00 and ends at 00:01:00 (120 seconds), what is the...

  • RE: Employee Hierarchy

    This is probably too simple, but maybe a start for you:

    SELECT a.*

    FROM #Orders a

    INNER JOIN (

    SELECT OrdNum, EmpID

    FROM #Orders

    ...

  • RE: Unique runs

    sjsubscribe (8/30/2012)


    Eugene, thanks for 3-parts set warning. I read it in the JM article and went back and fixed some of my old quirky update code as well. But all...

  • RE: Are the posted questions getting worse?

    Jeff Moden (8/30/2012)


    Brandie Tarvin (8/29/2012)


    dwain.c (8/29/2012)


    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...

  • RE: Select table names from queries

    ChrisM@Work (8/30/2012)


    SELECT

    m.[Definition],

    d.TABLE_NAME

    FROM sys.sql_modules m

    OUTER APPLY (

    SELECT TABLE_NAME

    FROM YourDatabase.INFORMATION_SCHEMA.TABLES t

    WHERE m.definition LIKE '%'+t.TABLE_NAME+'%'

    GROUP BY TABLE_NAME

    ) d

    Edit: changed db name

    A man of few words! I love...

  • RE: Select table names from queries

    Eugene Elutin (8/30/2012)


    ...

    not to mention finding tables inside comments...you need to strip comments out too.

    Dwain solution will also suffer from having comments and also heavily depends on statement formatting

    Try:

    create table...

  • RE: Select table names from queries

    RBarryYoung (8/30/2012)


    Geez, I go to bed, get up, and there's twenty new posts!

    Anyhoo...

    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...

Viewing 15 posts - 2,896 through 2,910 (of 3,957 total)