Forum Replies Created

Viewing 8 posts - 31 through 38 (of 38 total)

  • RE: OR / IN

    I prefer "IN" for readability and maintenance.  Haven't checked performance though.

  • RE: Question About DEFAULT

    According to Books on Line ...

    DEFAULT

    Is a keyword that specifies the default value for the column. DEFAULT definitions can be used to provide values for a new column in...

  • RE: Pivot/Cross table

    Can be done by using same technique as in my reply to the thread

    Flattening several rows into one row

    Just replace the comma as a separator with a tab -...

  • RE: Flattening several rows into one row

    Try adapting this bit of skeleton code ....  should be OK providing your tables are small enough.

    declare @t1 table (claim char(1), cust char(1), report char(1))
    insert into @t1 values ('a','x','1')
    insert into @t1...
  • RE: Problem with NOT EXISTS

    The where not exists should be changed ...

    SELECT ... from #tblMMStudentTestScoresTEMP abc
     
    WHERE NOT EXISTS
    (SELECT 'y'
     FROM tblMMStudentTestScores
     where Permnum = abc.Permnum
     and ShortName = abc.ShortName ...  etc
     

     

  • RE: Help on Date time

    ... or use one convert statement, and use substring to extract the part you want.

    eg select substring(convert(char(20),getdate(),113),13,8)

  • RE: Delimited Row of Data Using Cursor & Dynamic SQL

    For another possibility, see my code in "xp_sendmail problem". Uses a text column to generate the required string. Has the advantage that the string can grow longer than...

  • RE: xp_sendmail attach output problems

    DTS would have probably been a bit more awkward for the requirements - csv with quotes around headings as well as data - plus having to have a timestamp as...

Viewing 8 posts - 31 through 38 (of 38 total)