Re: Does Informix-SQL have Perl-like functions?
Posted in 2003
1) u can call a c function which will use strtok to do this 2) MAIN define l_string char(50) define l_arr ARRAY[50] of char(50) define l_cnt,j,l_cnt_tmp smallint let l_cnt =1 let l_cnt_tmp =1 let l_string = "dhali-preet" for j=1 to length(l_string) if l_string[j] = "-" then let l_cnt = l_cnt + 1 let l_cnt_tmp = 1 continue for end if let l_arr[l_cnt][l_cnt_tmp] = l_string[j] let l_cnt_tmp = l_cnt_tmp + 1 end for for j=1 to l_cnt display "val:",l_arr[j] end for end main Rgds Preetinder ~ Professor Bruno wrote: >Greetings, > >Apologies if this has been answered before. > >Does Informix-SQL have functions such as Perl's 'split'. > >We have a field which contains data delimited by "-" (dashes); the data >is of variable length so we can't use field1[x,x] types of >approaches. > >Any help in this regard would be appreciated. > >Thanks in advance. > > >Max Pyziur >pyz@brama.com > > sending to informix-list