SELECT C.Id 'CustInteractId',P.Name 'Participant',P.Id 'ParticipantId' INTO #Temp8
FROM
dbo.CustomerInteractions C INNER JOIN Participants P ON 1=1;
SELECT * FROM #Temp8;
DROP TABLE #Temp8;
DECLARE @Names NVARCHAR(500);
SELECT @Names = [Participants] FROM Sheet$ WHERE [Sr# No#] = 1;
PRINT @Names;
--SELECT * FROM dbo.UTILfn_Split(@Names,','); ----Below 2 stmts any stmt can work...
select * from dbo.FN_ListToTable(',',@Names);
SELECT T.Participant,T.CustInteractId,T.ParticipantId INTO #Temp9
FROM Sheet$ S INNER JOIN #Temp8 T
ON T.Participant = select * from dbo.FN_ListToTable(',',@Names);
how we can use split function on 'ON' conditionsantosh ippili January 11, 2012 at 7:50 PM
SELECT C.Id 'CustInteractId',P.Name 'Participant',P.Id 'ParticipantId' INTO #Temp8 FROM dbo.CustomerInteractions C INNER JOIN Participants P ON 1=1; SELECT * FROM #Temp8; DROP TABLE #Temp8; DECLARE @Names NVARCHAR(500); SELECT @Names = [Participants] FROM Sheet$ WHERE [Sr# No#] = 1; PRINT @Names; --SELECT * FROM dbo.UTILfn_Split(@Names,','); ----Below 2 stmts any stmt can work... select * from dbo.FN_ListToTable(',',@Names); SELECT T.Participant,T.CustInteractId,T.ParticipantId INTO #Temp9 FROM Sheet$ S INNER JOIN #Temp8 T ON T.Participant = select * from dbo.FN_ListToTable(',',@Names);
Post your Comment