Forum Replies Created

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

  • RE: BULK INSERT missing last row?

    draca.milos89 (11/21/2016)


    Hello, I have text files that are tab delimited. My Bulk works fine until I discovered one situation if I value in the last row column filed is empty...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Unable to run Dir using xp_cmdshell

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

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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,

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: pivot table invalid column

    Just remove the single quotes.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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?...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • 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...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

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