CREATE PROCEDURE [dbo].[OnelinePODate] AS BEGIN Select Main.Ibill_no, Left(Main.PoNo,Len(Main.PoNo)-1) As "PoNo",Left(Main.PoDt,Len(Main.PoDt)-1) As "PoDt" From ( Select distinct ST2.Ibill_no, ( Select ST1.PoNo + ',' AS [text()] From dbo.items_sold ST1 Where ST1.Ibill_no = ST2.Ibill_no ORDER BY ST1.Ibill_no For XML PATH ('') ) [PoNo], ( Select cast(ST1.podate as char(11)) + ',' AS [text()] From dbo.items_sold ST1 Where ST1.Ibill_no = ST2.Ibill_no ORDER BY ST1.Ibill_no For XML PATH ('') ) [PoDt] From dbo.items_sold ST2 ) [Main] END
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)