Re: Re: Getting the number of rows returned by a select with group by.
Posted in 2004
Well the problem I face some time ago ago was some kind of:
... sp_foo(...) ...
select ... into temp tx_foo with no log;
...
drop table tx_foo;...
And when I ran a query like this:
select col_1,col_2,...,col_n, sp_foo(col_i,..., col_k)
from some_table;
Informix Online 5.xx (at that time) complains about as tx_foo already exists and couldn't be dropped.
The solution was to use exceptions and catch this exception _drop tx_foo_ and resume...
Well the quid of this is the fact that inside the stored procedure I create a temporary table for some purpose and when it was used it was discarded...
With a derived table like ...
FROM TABLE( MULTISELECT (...)) -- IDS 9.x of course
I think I could avoid the problems I have, but of course, I'm jus speculating here, I have no prove of this.
Chucho!
-----Original Message-----
From: "Colin Bull" <Colin.Bull@videonetworks.com>
To: <informix-list@iiug.org>
Date: Thu, 30 Sep 2004 13:23:23 +0100
Subject: Re: Getting the number of rows returned by a select with group by.
Jean Sagi wrote
> Besides...
>
> Let say you call stored procedure for every row in a query,
> _and_ inside the stored procedure you create and drop a
> temporary table...
I think we may have this problem ...
>
> I had a lot of problems doing this, unitl someone give a
> solution to this by using exceptions...
Can you explain what you mean here please.
>
> I think no problem exist by using _derived tables_ .
Colin Bull
________________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email
Security System.
________________________________________________________________________
sending to informix-list
Jean Sagi
jeansagi@myrealbox.com
jeansagi@yahoo.com
sending to informix-list