Code Snippet |
declare @qry varchar(100), @StartLoc int select @StartLoc = 1 select @qry = '1 df546 156 008 10/00 1203301985 BEY 112354 PaaaP 6785.00 012300-0110 011011011080 B O ' create table #VenkatTable(val int) while @StartLoc <= len(@Qry) begin set @StartLoc = charindex(' ',@qry,@StartLoc) insert into #VenkatTable values (@StartLoc) set @StartLoc = @StartLoc+1 end select * from #VenkatTable drop table #VenkatTable |
Regards,
Venkatesan Prabu .J
No comments:
Post a Comment