Basically We Use Split Function Thorugh Commma Sepertaed string value with Comma Means One Then more value through split function Enter and Fatch Single Values in A new Record
Ex.
Create procedure CommaSeperate
@st1 nvarchar(max),
str2 nvarchar(max)
AS
DECLARE @i INT,@totaltran INT ,@st11 NVARCHAR(50),@str22 NVARCHAR(50)
SELECT @totaltran=dbo.fnCountOccurences(',',@str22)
SET @i=1
WHILE @i<=@totaltran
BEGIN
SELECT @st11=a.Word,@str22=b.Word FROM dbo.splitpra(@st1) a, dbo.splitpra(@str2)
nbsp; WHERE a.position=@i AND b.position=@i
SET @i=@i+1
Execute Query And PRocedure
END
SELECT @totaltran
0 comments :
Post a Comment