Re: Stored Procedures Informix SPL (status-var ?)
Posted in 1999
Ingo There are 2 ways to do it that I know of: 1) let somevar = null select somecol into somevar from sometable where somecondition; if (somevar is NULL) then error(no rows returned); end if; 2) select somecol into somevar from sometable where somecondition; let nrows = DBINFO('sqlca.sqlerrd2'); if (nrows = 0) then error(no rows returned); end if; HTH Sujit Ingo Trapphagen <ingo@strauss-in.com> on 12/14/99 01:04:53 AM Please respond to Ingo Trapphagen <ingo@strauss-in.com> To: informix-list@iiug.org cc: (bcc: Sujit Pal) Subject: Stored Procedures Informix SPL (status-var ?) Hi, Does somebody have any information concerning Informix-SPL. I have only one question: i want to check in a stored procedure if a SQL-Select has returned rows or not ! the informix-hotline couldn`t help me. is there a status-var which i can evaluate. In ESQL/C or 4GL there are SQLCODE and STATUS or something like that. please email to :mailto:ingo@strauss-in.com i will later post a solution. thanxs to all