Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
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
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.