insert into table variable

  • what about the first two,

    i cant use 2 times select in my sp.

    need to hv just 1,what about group by and then order by

  • What first two?

    Group by is for aggregation (sum, min, max, etc), not ordering.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • ORDER BY

    CASE WHEN <whatever the column name is> LIKE 'Performance%' then 1 ELSE 0 END,

    <next column to order by>

Viewing 3 posts - 31 through 32 (of 32 total)

You must be logged in to reply to this topic. Login to reply