Forum Replies Created

Viewing 15 posts - 1,831 through 1,845 (of 8,731 total)

  • RE: Unable to run Dir using xp_cmdshell

    If the path has spaces, use double quotes around it.

  • RE: Multiple calls to MAX(datecolumn) in select

    Once again, J.Celko was able to confuse instead of helping. He's absolutely correct, the MAX() function will be evaluated once within the scope of the query. The problem is that...

  • RE: Multiple calls to MAX(datecolumn) in select

    andis59 (11/21/2016)


    MMartin1 (11/21/2016)


    The MAX(rowCreatedDT) is only scanning the table once!

    There is a button in your SSMS window that displays "include actual execution plan" when you hover over it. You push...

  • RE: RETRIEVE NEXT TIME VALUE FROM NEXT RECORD

    drew.allen (11/21/2016)


    sharonmtowler (11/21/2016)


    THIS WORKED LIKE A CHARM !!

    It may have "worked" but it is likely to perform horribly. You should compare it to LEAD/LAG before settling on that as...

  • RE: Today's Random Word!

    djj (11/21/2016)


    whereisSQL? (11/21/2016)


    Revenant (11/21/2016)


    djj (11/21/2016)


    whereisSQL? (11/21/2016)


    Manic Star (11/21/2016)


    Ed Wagner (11/21/2016)


    Brandie Tarvin (11/21/2016)


    BWFC (11/21/2016)


    Grumpy DBA (11/21/2016)


    BWFC (11/21/2016)


    Ed Wagner (11/21/2016)


    firemanbens6 (11/18/2016)


    Ed Wagner (11/18/2016)


    Snake

    Plissken

    New York

    New York

    Escape

    Character

    Search

    Seek

    Scan

    Print

    Ink

    Jet

    Ace

    High

    Mile

  • RE: Store procedure to export a table to csv file

    You could try using bcp, which could be called with xp_cmdshell.

    Another option is to change the process and use SSIS.

  • RE: pivot table invalid column

    You could also try a cross tabs approach.

    SELECT BUSINESS_NAME,

    CONTRACT_CATEGORY,

    SUM( CASE WHEN NAME = 'RX' THEN VALUE ELSE 0 END) AS RX,

    ...

  • RE: pivot table invalid column

    Just remove the single quotes.

  • RE: Stored Procedure that uses a parameter in a WHERE x IN(@param1)

    CELKO (11/21/2016)


    If you want to have a set of scaler values in a query, then you need to put them in a table or a table constructor.

    The OP is asking...

  • RE: recursive query to find out orphans

    Here's an option on how to get all the orphans and their children.

    declare @Sample table (L1 int, L2 int, L3 int, L4 int, ID int, description varchar(100))

    Insert Into @Sample...

  • RE: Stored Procedure that uses a parameter in a WHERE x IN(@param1)

    Eirikur Eiriksson (11/21/2016)


    Steve Thompson-454462 (11/21/2016)


    Eirikur Eiriksson (11/20/2016)


    Budd (11/18/2016)


    WOW!!!

    So very many possibilities, and so much to consider..

    Quick questions, can you use Table Variable Parameter? How wide are the largest values passed?...

  • RE: Wildcard Searches

    Iwas Bornready (11/21/2016)


    I enjoyed reading your article, reminding me of some of the odd nuances of pattern matching.

    Thank you for the feedback.

    If you have some interesting examples, it would be...

  • RE: Wildcard Searches

    h.tobisch (11/18/2016)


    You say using CHARINDEX or PATINDEX for testing for the occurrence of a character string is a bad idea.

    that's why i read this article.

    Could not find more of an...

  • RE: Are the posted questions getting worse?

    Phil Parkin (11/21/2016)


    Ed Wagner (11/21/2016)


    Jeff Moden (11/21/2016)


    I have to do some more research on it but it may be time for me to get ready to retire.

    [font="Arial Black"]Microsoft Replaces Command...

  • RE: Wildcard Searches

    Christy M (11/18/2016)


    Great article. And I love the Sesame Street reference 😀

    I'm glad that you liked it. Thank you for the feedback.

Viewing 15 posts - 1,831 through 1,845 (of 8,731 total)