Forum Replies Created

Viewing 15 posts - 31 through 45 (of 105 total)

  • RE: Lists

    Very useful combination which as many others I use a lot,

    The pity is the first answer should have been

    FOR XML PATH('')), 1, 2, '')

    because as is, you get a...

  • RE: Formatted output

    NBSteve (10/29/2014)


    raulggonzalez (10/29/2014)

    [text()] is a misleading alias in this case... Note that is wrapped with [square brackets]

    just run

    SELECT

    DepartmentName + ';'...

  • RE: Formatted output

    James_R_Alves (10/29/2014)


    SELECT

    SUBSTRING(Ms, 1, DATALENGTH(Ms)/ 2 - 1)

    FROM

    ( SELECT

    DepartmentName + ';' AS [text()]

    ...

  • RE: Formatted output

    Louis Hillebrand (10/29/2014)


    Koen Verbeeck (10/29/2014)


    Nice question, thanks.

    A bit curious as why you use DATALENGTH instead of just LEN.

    With DATALENGTH you can also use a space as the separator, LEN strips...

  • RE: SETSPN

    Thanks for the question,

    easy if you've been messing up with kerberos authentication...:hehe:

  • RE: Create a stored procedure

    Vimal Lohani (10/14/2014)


    happycat59 (10/14/2014)


    I get error

    Msg 156, Level 15, State 1, Procedure my_sp, Line 2

    Incorrect syntax near the keyword 'FROM'.

    because "Column" is a reserved keyword and needs to be delimited...

  • RE: XP_Cmdshell 'Access is denied'

    slash.young (5/8/2014)


    I know this is an old post, my apologies. I had this same issue... so I did the above suggestion and set the Logon account for the SQL...

  • RE: The first thing to do with a damaged off-line database

    twin.devil (7/18/2014)


    Tail log backup WITH CONTINUE_AFTER_ERROR works only if the database goes offline in case during the start up of the database is fail to come online due to some...

  • RE: The first thing to do with a damaged off-line database

    obviously the first thing should be to backup the log, but what is the point when the database is offline and you will get an error?

    BACKUP LOG [QODTest] TO DISK...

  • RE: Log Files

    thanks for the question,

    but why all answers say "only" at the end?? that's a bit confusing since no option has all the types listed in BOL. :w00t:

  • RE: Getting the grid back

    Steve Jones - SSC Editor (5/16/2014)


    Arrggh, I ticked the wrong box, and apparently got fooled by the documentation. I use this all the time, so I'm guessing I was moving...

  • RE: Getting the grid back

    If you have results to text and you WOULD NOT want them back to grid, the best answer is DO NOTHING... and it will stay as is.

    Definitely, that negative did...

  • RE: Datatypes In Your Mind

    rhythmk (5/6/2014)


    raulggonzalez (5/6/2014)


    Thanks for the question,

    I guess the author goes more this way

    --the smallest exact number integer data type that can't support a negative number

    declare @bit bit

    set @bit =...

  • RE: Datatypes In Your Mind

    Thanks for the question,

    I guess the author goes more this way

    --the smallest exact number integer data type that can't support a negative number

    declare @bit bit

    set @bit = -1

    Command(s) completed...

  • RE: It's Not All About The Keys

    Mighty (4/14/2014)


    nenad-zivkovic (4/14/2014)


    The logic behind the question suggest that the `backuplist` is subset of `databases`, and that FK should be created on `backuplist` to reference `databases`. Check query seems to...

Viewing 15 posts - 31 through 45 (of 105 total)