RE: Need help with SQL statement
Posted in 1998
I did not know that you could not use 'into' in a prepare statement, but I tried it and sure enough I got a runtime error. You could do the following: prepare the string without the 'into' then, declare a cursor for the prepared statement then, foreach the cursor into your acctbal variable. (If I didn't explain that well I could send you some code) ... but ... there's got to be a better way, this is just off the top of my head... } -----Original Message----- } From: Jon Gjerset [SMTP:jwg@nuera.com] } Sent: Wednesday, January 07, 1998 2:16 PM } To: informix-list@rmy.emory.edu } Subject: Need help with SQL statement } } I trying to summarize data from a table that has the following } structure: } } select sum(actbX) into acctbal from tablename } } } Can anyone out there suggest a good way to do this other then using a } long CASE statement? } } Any help will be much appreciated. } } Jon Gjerset } jwg@nuera.com