Quantcast
Channel: Answers for "Why the below does not work properly"
Browsing all 4 articles
Browse latest View live

Answer by Cyborg

Try this.... DECLARE @t VARCHAR(255), @splitAt int set @t = 'this is a text ' set @splitAt = 4 ;with cte as ( Select CONVERT(VARCHAR,LEFT(@t,@splitAt)) SplitedString,STUFF(@t,1,@splitAt,'') String,...

View Article



Answer by Cyborg

I hope this will solve your problem DECLARE @t table( ID int identity, Data varchar(50), SplitAt int) Insert into @t Select 'this is a text', 4 union all Select 'this is again a', 5; WITH CTE AS (...

View Article

Answer by Cyborg

Try this.... DECLARE @t VARCHAR(255), @splitAt int set @t = 'this is a text ' set @splitAt = 4 ;with cte as ( Select CONVERT(VARCHAR,LEFT(@t,@splitAt)) SplitedString,STUFF(@t,1,@splitAt,'') String,...

View Article

Answer by Cyborg

I hope this will solve your problem DECLARE @t table( ID int identity, Data varchar(50), SplitAt int) Insert into @t Select 'this is a text', 4 union all Select 'this is again a', 5; WITH CTE AS (...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images