Re: [GENERAL] Catch multiple records when doing Select Into

2006-11-04 Thread SunWuKung
Hugh, that's a long way to do that. Thanks for the help. SWK Ketema wrote: > It would be easier if we could see the context in which you are doing > the select into. However I think this may help. Try putting the > select into in a loop: > > declare > _result record; > _rows integer; >

Re: [GENERAL] Catch multiple records when doing Select Into

2006-11-02 Thread Ketema
It would be easier if we could see the context in which you are doing the select into. However I think this may help. Try putting the select into in a loop: declare _result record; _rows integer; begin _rows := 0; for _result in select statement here loop in here p

[GENERAL] Catch multiple records when doing Select Into

2006-11-02 Thread SunWuKung
I have a SELECT INTO varname columname FROM ... statement and I would like to raise an exception when that returns more than one record. GET DIAGNOSTICS rowcount = ROW_COUNT seems to return always one for this. Currently I find no other way to do that than to run this statement twice - first to see