Strings in Stored Procedures
Posted in 1994
Ken Miles — — source: Informix-list mailing list archive (1991-1998)
They couldn't possibly have intended for it to work this way. I need to do some minor string manipulations in a stored procedure. Per page 7-358 in my 5.0 SQL Reference Manual "Subscripts on Character Columns" I came up with the following code fragment and got a syntax error: define v_uname char(20); define i int; . . for i in (1 to 20 step 1) if v_uname[i,i] <> ' ' then # ^ # 201: A syntax error has occurred. # Huh? Putting literals in the brackets fixes the syntax error but doesn't solve my problem: for i in (1 to 20 step 1) if v_uname[1,1] <> ' ' then . . . So how do I walk through a string in a stored procedure? Ken Miles Hewlett-Packard kenm@vcd.hp.com