Forum Replies Created

Viewing 15 posts - 886 through 900 (of 1,246 total)

  • RE: SELECT JOIN AND INSERT QUERY

    Something along these lines should do the trick...

    IF OBJECT_ID('tempdb..#TblClientPOCV2', 'U') IS NOT NULL

    DROP TABLE #TblClientPOCV2;

    CREATE TABLE #TblClientPOCV2 (

    ID INT IDENTITY(1, 1) NOT NULL PRIMARY KEY CLUSTERED,

    ClientID NCHAR(10) NULL,

    StartDate DATE NULL,

    ApptTime...

  • RE: the use of CTEs

    Sergiy (1/6/2016)


    Jason A. Long (1/6/2016)


    But you were 11 mins too slow... 😛

    Sorry, was having lunch, and did not refresh the page before hitting "Add Reply".

    Did not even bother checking email...

  • RE: the use of CTEs

    But you were 11 mins too slow... 😛

  • RE: the use of CTEs

    Luis Cazares (1/6/2016)


    Been following this discussion, but I didn't feel like getting in it.

    I believe that over use of CTEs is as bad as the lack of CTEs. I'd rather...

  • RE: the use of CTEs

    below86 (1/6/2016)


    erics44 (1/6/2016)


    everyone writes code that they go back to later and think, what was I thinking when I wrote that pile of poo

    That is so true, I don't know...

  • RE: The Most Common Query Blunders...

    Kevin, sorry for the delay in getting back in touch with you. I did talk to the boss yesterday. He's definitely game for doing the webex but he's giving me...

  • RE: Limiting Access to the Secondary (Read Only) Node of High Availability Group

    MadAdmin (1/5/2016)


    Login trigger on live server A.

    No login trigger on liver server B

    Do rollback if Login name = 'ThisHardenedDeveloper'

    Thanks MadAdmin,

    Correct me if wrong (a very real possibility), but that would...

  • RE: the use of CTEs

    It's just a matter of personal preference...

    For simple queries, with a single, simple derived table, I tend not to care one way or another. They're both easy to read.

    When...

  • RE: Recursive with a check point

    Siten0308 (1/4/2016)


    Jason... DANG exactly!!!

    except i think you have this part as well, IF the part such as an example: for the scooter, if you dont have enough scooters to meet...

  • RE: Recursive with a check point

    I get the impression that you're trying to build out an order processing system that may be a bit more complex than your test data is able to represent...

    Tell us...

  • RE: The Most Common Query Blunders...

    Jeff Moden (12/30/2015)


    (there is a "halo" exception... if the column has been defined as NOT NULL, the ISNULL is ignored). The other two WHERE clauses are not.

    Interesting... I didn't...

  • RE: The Most Common Query Blunders...

    Grant Fritchey (12/28/2015)


    I have two presentations I do on best practices. Both slide decks are available on slideshare.net. That could act as a guide. Just give me some attribution if...

  • RE: The Most Common Query Blunders...

    I'm sure it's on the radar of the SOC officers and security compliance personnel... I don't claim to be overly knowledgeable regarding the specific laws, rules & regs, so I...

  • RE: The Most Common Query Blunders...

    Jeff Moden (12/25/2015)


    Jason A. Long (12/25/2015)


    The one I came across a couple days ago...

    WHERE LEN(t.SSN) = 9

    as opposed to

    WHERE t.SSN LIKE [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]

    The LEN check doesn't do it alone. It...

Viewing 15 posts - 886 through 900 (of 1,246 total)