Subject re using tib_stored procedure
Helen Thanks

I have got it working at last but it is incredibly slow !!
I have three nested procedures and the innermost one does
'getcount(col a) from mytable where colB= ,and colC= and colD= '
the table has 15,000 records and I have to do this for each of 10
values of col B and 1000 values of colC. So this amounts to 10,000
goes of getcount(col a) before the result is available.

Now when I did it directly from the client using queries I first
reduced the table size by doing "insert into temptab select from
mytab where colB =" (table now typically 1000 records)
then reduced again " insert into temptab2 select from temptab where
colC =" (table now typically 100 records)
then select count( ) this was vastly faster over all.

Can I do this sort of thing with stored procs ?
But I was told this was not a proper way of doing it in any case !

I suppose I need to turn my nesting somehow inside out !
It is getting late and I am tired. But any thoughts would be welcome.