Forum Replies Created

Viewing 15 posts - 1 through 15 (of 1,553 total)

  • RE: Char And int

    I merely think that it produces the expected result according to the OP's presented scenario. 😉

    However, should there be that his data actually *could* contain rows that had any of...

  • RE: Char And int

    Just noticed the thread is a bit dated, but it seemed there was no real answer...

    Why make it so complicated?

    As per OP's request he just wants single chars 1 through...

  • RE: BULK INSERT issue with truncation

    Your formatfile specifies \r as rowterminator for the last column.

    Make sure that the datafile and formatfile uses the same terminator.

    You could try to change the formatfile to "\ n" ...

  • RE: Invalid length parameter passed to the substring function


    This thread is more than three years old, so I'd think it would be better if you presented your problem in a new thread.

    When you do, please also provide some...

  • RE: Count of records with different conditions in the same select statement

    Another variation:

    Select sum(case C.IT_Code when 'SRIP' then 1 else 0 end) as SRIP,

    sum(case C.IT_Code when 'TA' then 1 else 0 end) as TA


  • RE: CASE Statement

    The last three requirements,

    if date1 is null and date2 are null return null.

    if date1 is null but date2 is present return date2

    if date1 is present but date2 is null return...

  • RE: RAID 1 vs. RAID 10

    RBarryYoung (12/29/2008)

    No, RAID 1 has twice the Read IO throughput of a single disk.

    How can that be, Barry?

    RAID 1 can only have two drives, and one is dedicated to...

  • RE: How to calculate the Bi-weekly in SQL

    If you change the connections default batch separator token from it's default 'GO' to something else, then (without ending semicolon)...


    .. will indeed work.


  • RE: Writing select results to a file

    You could also save the selects in a scriptfile, make a simple (dos) batchfile and use sqlcmd with the script as input and >> to an outputfile.

    It doesn't need to...

  • RE: SYSXLOGINS --- In 2005

    syslogins is still in 2005 (for backward compat reasons)

    Do a sp_helptext syslogins and you can see what it uses in 2005.

    There's a whole bunch of sys.* catalogviews available with different...

  • RE: Determining Physical Size of Tables/Indexes etc..

    Had to make a small modification to actually get the different results instead of always the results from the current db.

    sp_msforeachdb 'use ? dbcc showfilestats'


    sp_msforeachdb 'use ? exec sp_spaceused'





  • RE: SYSXLOGINS --- In 2005

    Well, as you know, this is the thing when using systemtables.

    They often change between versions.

    I think your best bet would be to just write a 2005-version of your query, stick...

  • RE: Can we?

    Well, the correct answer is 'It depends' 😉

    (happy Holidays to all)


  • RE: Can we?

    And here's the information_schema 'optional non-cte version'

    select t.table_name,

    ( select stuff(

    ( select ','...

  • RE: Can we?

    Here's the op's original question:

    Here is a code that is returning a list of all the user tables with their fields list.

    My question is can we re-write this code without...

Viewing 15 posts - 1 through 15 (of 1,553 total)