I am using Following procedure to split two strings which are contacted by (VBCRLF), I have tried using all possible options but didn't get any solution.
dECLARE @Data1 nvarchar(100)
Declare @Cnt int
DECLARE @RowData nvarchar(2000)
DECLARE @SplitOn nvarchar(5)
SET @RowData = 'meter(a) pulsesKWh(800)'
SET @SplitOn = CHAR(13) + CHAR(10)
Set @Cnt = 1
Select Data1 = ltrim(rtrim(Substring(@RowData,1,Charindex(@SplitOn,@RowData)-1)))
Set @RowData = Substring(@RowData,Charindex(@SplitOn,@RowData)+1,len(@RowData))
Set @Cnt = @Cnt + 1
Select Data1 = ltrim(rtrim(@RowData))
Here is the result what I am getting.
I need them like below, because they are concatinated with vbcrlf means (CHAR(13) AND CHAR(10))
Any ideas to solve this?
Thanks in advance