Hi ,
i have a string as'
update [inventory] SET groupit=1,Group_ID=19780 where Inv_Id= 00252 #update [inventory] SET groupit=1,Group_ID=19780 where Inv_Id= 00251 #update [inventory] SET Inventory_no= [dbo].[fn_GenerateInvNum_withArticleId](00257,0) , Article_DescID=0 , LocationID=1,DeptID=1,UserID= 1 where Inv_Id= 00257 #update [inventory] SET Inventory_no= [dbo].[fn_GenerateInvNum_withArticleId](00281,0) , Article_DescID=0 , LocationID=1,DeptID=1,UserID= 1 where Inv_Id= 00281 #
'
i want to replace '#' with new line.I want the result as
update [inventory] SET groupit=1,Group_ID=19780 where Inv_Id= 00252
update [inventory] SET groupit=1,Group_ID=19780 where Inv_Id= 00251
update [inventory] SET Inventory_no= [dbo].[fn_GenerateInvNum_withArticleId](00257,0) , Article_DescID=0 , LocationID=1,DeptID=1,UserID= 1 where Inv_Id= 00257
.......
.......
for this i have wriiten query as
select replace(@stringwithHash,'#',CHAR(13) + CHAR(10))
but i am geting error as
The name update [inventory] SET groupit=1,Group_ID=19780 where Inv_Id= 00252
update [inventory] SET groupit=1,Group_ID=19780 where Inv_Id= 00251 is not a valid identifier
'
The lengh of
@stringwithHash
has max data.