Using a variable in SQL with an Update statement
Posted in 2000
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
I need to update a table with 79 rows. I have a field which will have a string of text appended to what's already there. I'm thinking that using a variable would make sense. Something Like Update Table printtab Set prcommand={field_contents} || ' -olandc' Where 1=1; Where {field_contents} represents the current field contents. I'm sure this could be done with 4GL, which I'm not familiar with yet, but can it be done using Informix-SQL or a temporary stored procedure? I'm connecting to a 7.X Informix engine, if that's relevent. Thanks, Steve Schroeder Merchant & Gould
Use something like: Update Table printtab Set prcommand = prcommand || ' -olandc' Where 1=1; In article <KAgM5.5754$FU3.1341904@ptah.visi.com>, "Steve Schroeder" <sschroeder@merchant-gould.com> wrote: > I need to update a table with 79 rows. I have a field which will have a > string of text appended to what's already there. I'm thinking that using a > variable would make sense. > > Something Like > > Update Table printtab Set prcommand={field_contents} || ' -olandc' Where > 1=1; > > Where {field_contents} represents the current field contents. > > I'm sure this could be done with 4GL, which I'm not familiar with yet, but > can it be done using Informix-SQL or a temporary stored procedure? > > I'm connecting to a 7.X Informix engine, if that's relevent. > > Thanks, > > Steve Schroeder > Merchant & Gould > > Sent via Deja.com http://www.deja.com/ Before you buy.