[dba-SQLServer] SQL Question

Martin Reid mwp.reid at qub.ac.uk
Thu Apr 22 02:58:05 CDT 2004


Given a one to many relationship is it possible to produce this output using
an SP without the use of cursors etc??

 INPUT TABLE 1

      1000
     IT

      1000
     Databases

      1000
     VMS

      1001
     Spreadsheets

      1001
     GenStat

      1002
     Aquatic systems

      1002
     Research




INPUT TABLE 2



      1000
     Smith

      1001
     Brown

      1002
     Foster




 OUTPUT REQUIRED

      1000
     Smith
     IT, Databases,VMS

      1001
     Brown
     Spreadsheets,GenStat

      1002
     Foster
     Aquatic Systems,Research




Martin




More information about the dba-SQLServer mailing list