Re: Stored procedures
Posted in 1996
Eckythump wrote: > > Hi all, > > I've been using Informix 4gl & SQL for 6 years now, and I'm ashamed to > admit that I've never used (or indeed heard of) stored procedures > until a few days ago. > > I've been playing with them now for a few days and I think they could > revolutionize my programming. > > Two questions for all you Informix experts, one is their anything I > should know about/any pitfalls before I start using these all over the > place, and secondly does anybody know of any good reference material > giving me more information on stored procedures & triggers. > > Any help would be much appreciated > > Thanks > > Paul Eccleston. ethump@netcomuk.co.uk Hi Paul, to your first question: Stored procedures don't support dynamic sql. The following example won't work: LET sql = 'SELECT cols from table WHERE ' || condition prepare sqlex from sql declare sqlc cursor for sqlex foreach sqlc into hostvars All sql in is static, as sp's are compiled on the server at creation time. I've also heard, that arrays aren't supported, too. to your second question: Recently, there was a post about a book: Informix Stored Procedures Programming ISBN 0-13-206723-4 Also, you might have a look at www.iiug.org and see the stored procedures examples in their archives. Regards, Roland