Home Forums SQL Server 2008 T-SQL (SS2K8) Creating 1 Select Query without Cursor, Function, temp object or Loop RE: Creating 1 Select Query without Cursor, Function, temp object or Loop

  • sqlindia (12/26/2012)


    I have a query that need to Rewrite it without cursor, function or loop to produce same result and should be included in ONE SELECT (no temporary object involved).

    Why those restrictions? Sounds like rules for a test or competition...

    Look up the FOR XML method of string concatenating.

    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