cybercop23
IS-IT--Management
Hi all. How can I get the result of an Informix select query into a set of variables that I can use within my script? Here's what I have:
....
UPC1=00"$UPC"
upc=`echo "$UPC1" | cut -c 1-13`
dbaccess itemmaster << stp
select upmdesc, upmsize
from upm
where upmdesc = "$upc";
stp
....
Since this only returns one row, I want the two fields from the query to be parsed into variables that I can later use in my script. Somethig like:
item_description should be upmdesc
item_size should be upmsize
Any ideas?
Thanks
Alex
....
UPC1=00"$UPC"
upc=`echo "$UPC1" | cut -c 1-13`
dbaccess itemmaster << stp
select upmdesc, upmsize
from upm
where upmdesc = "$upc";
stp
....
Since this only returns one row, I want the two fields from the query to be parsed into variables that I can later use in my script. Somethig like:
item_description should be upmdesc
item_size should be upmsize
Any ideas?
Thanks
Alex