DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Select Into Query

01.29.2007
| 308 views |
  • submit to reddit
        
SELECT DISTINCT CALL_NUMBER, Actie = Replace(REPLACE
                          ((SELECT     ACTIONS_DESC AS [data()]
                              FROM         dbo.CL_PROBLEM_HISTORY clh
                              WHERE     clh.CALL_NUMBER = c.CALL_NUMBER
                              ORDER BY CALL_NUMBER, HISTORY_ORDER FOR XML PATH('')), ' ', ' '), '
', ' ')
INTO NOTITIE
FROM         dbo.CL_PROBLEM_HISTORY c