Re: variable let statements ?
Posted in 1995
> (1)Is there a way to do any type of "variable" LET statement ?=20 >=20 > EXAMPLE: j_num is a smallint, possible range for j_num is 1-8,=20 > Informix Ver. 4.11/OSF/DEC ALPHA >=20 > LET p_instruct.job,j_num USING "#","a" =3D p_pcssd_asps.field[14,17] >=20 > In theory :>) this would allow the assignment of values to the = fields > p_instruct.job1a,p_instruct.job2a,.....p_instruct.job8a, without=20 > having 7 additional lines of code. Only problem is, Informix can't=20 > handle this expression.=20 > Ken, I don't know about 4gl, but in SQL I'd do this with a nested select: update "table1" set "column1" =3D (select "column2" from "table2" where "column3" =3D "XXX") Is this possible in 4gl? Cheers, Richard. ----------------------------------------------------------------- =20 | _ =AF\\ | Richard Thomas | | \\ 0_ | r.thomas@csl.gov.uk | | \\ / | | | oo/ | "20 Regal and a four-pack, | | / \\ | I guess I'm set for the night" | | \\_/ | - "TV Tan" The Wildhearts | ----------------------------------------------------------------- >=20 > --------------------- > Ken McCoy > Applications Programmer > APSCN >=20