Re: Reading a temp table
Posted in 1998
iftikhar_khan@mailcity.com wrote: > Hi Everybody > I have a question on reading a temp table in Informix 4GL. In my Informix 4GL > code, I am taking some input from user and based on that input I am creating > a temp table and puting data into it from other tables. At any time this temp > table may have one or five or seven or as many columns as possible. Now I > want to read each column's data value. I am preparing a query (SELECT * FROM > myTempTable) and declaring a cursor for this query. Now I want a loop of > 'foreach' mycursor into ...... . But I donot have variables for into clause > because I donot know how many I need and of what type. How can I solve this > problem? Is there anyway of defining variables dynamically in Informix 4GL? No. Write this module in ESQL-C and call it from 4GL. You can describe the statement and determine how many vars to allocate and then return them to 4GL. Of course, handling the variable returns in 4GL is not fun either. Art S. Kagel