Hi guys,
my team have a dilema if we can code this in the SQLRPGLE. This is a front end SQL function. and i am not sure how to code this on our end.
thanks for the info.
my team have a dilema if we can code this in the SQLRPGLE. This is a front end SQL function. and i am not sure how to code this on our end.
Code:
declare @string varchar(500) set @string = ?ABC,DEF,GHIJK,LMNOPQRS,T,UV,WXY,Z? declare @pos int declare @piece varchar(500) ? Need to tack a delimiter if right(rtrim(@string),1) <> ?,? set @string = @string + ?,? set @pos = patindex(?%,%? , @string) while @pos <> 0 begin set @piece = left(@string, @pos ? 1) ? do whatever you want to with it. print cast(@piece as varchar(500)) set @string = stuff(@string, 1, @pos, ?) set @pos = patindex(?%,%? , @string) end


