Re: multi-statement prepare
Posted in 1997
Douglas Wilson — — source: Informix-list mailing list archive (1991-1998)
SaTriGuy wrote: > > I don't think this is a legal syntax. The syntax is basically legal. If I remove either the first or the second update statement, then it runs ok. But all three together give a syntax error. Douglas Wilson > let sql_stmt= > "update tbl1 set (col1, col2)= ", > "(col1+1, (col3/col4)*100) ", > "where col2=? and col4!=0; ", > "update tbl1 set (col1, col2)= ", > "(col1+1, (col3/20)*100) ", > "where col2=? and (col4=0 or col4 is null); ", > "update tbl2 set (col1)=(col1+1) where col2=?;" > > prepare sql_id from sql_stmt >