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.
Saira, on Informix 7.31, asked for an equivalent of @@rowcount to see how many rows a stored procedure inserted. Obnoxio The Clown suggested the SQLCA record. Art Kagel gave select dbinfo('sqlca.sqlerrd2') from systables where tabid = 1, and Doug Lawry noted dbinfo('sqlca.sqlerrd2') can be used directly inside the procedure, for example in an IF test.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Hello,
I have a stored procedure that executes a select statement (from table
A), and insert the resultset into another table (table B)... How can I
view the number of rows inserted into table B?
Thanks in advance for your help.
Saira.
On Apr 16, 4:20 pm, "saira" <saira_mat...@yahoo.com> wrote:
> Hello,
> I have a stored procedure that executes a select statement (from table
> A), and insert the resultset into another table (table B)... How can I
> view the number of rows inserted into table B?
> Thanks in advance for your help.
> Saira.
Sorry... forgot to mention that we use Informix Ver 7.31
saira said:
> Hello,
> I have a stored procedure that executes a select statement (from table
> A), and insert the resultset into another table (table B)... How can I
> view the number of rows inserted into table B?
> Thanks in advance for your help.
SQLCA record?
--
Bye now,
Obnoxio
"I'm astonished anyone pays real money for this crap."
-- Cosmo
--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.
↪ replying to saira
Art S. Kagel — — source: Usenet: comp.databases.informix
saira wrote:
> Hello,
> I have a stored procedure that executes a select statement (from table
> A), and insert the resultset into another table (table B)... How can I
> view the number of rows inserted into table B?
> Thanks in advance for your help.
> Saira.
>
select dbinfo('sqlca.sqlerrd2') from systables where tabid = 1;
Art S. Kagel
"Art S. Kagel" <kagel@bloomberg.net> wrote in message
news:4623F776.2020709@bloomberg.net...
> saira wrote:
>> Hello,
>> I have a stored procedure that executes a select statement (from table
>> A), and insert the resultset into another table (table B)... How can I
>> view the number of rows inserted into table B?
>> Thanks in advance for your help.
>> Saira.
>>
>
> select dbinfo('sqlca.sqlerrd2') from systables where tabid = 1;
>
> Art S. Kagel
You can use dbinfo directly within the stored procedure, for example:
IF dbinfo('sqlca.sqlerrd2') = 0 THEN ...
--
Regards,
Doug Lawry
www.douglawry.webhop.org
Your privacy choices
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.