Subject | Re: [firebird-support] Multiple Rows Error in Stored Procedure |
---|---|
Author | Nando Dessena |
Post date | 2004-12-22T12:07:04Z |
Mike,
h> I am getting the error "Multiple rows in singleton select" when i run
h> my stored procedure.
h> The stored procedure has a select statement
h> Select Field from Table where Value= InputValue into OutputValue.
h> Now i know what the error means. If the field has more than one
h> record where it is equal to the input value, it will give you that
h> error.
h> However, looking at the data, i know for sure there is only 1 record
h> for each value of this field.
either you are not so sure <g> or your database is somehow damaged (f.
ex. bad indexes - I'd try a validation through gfix just to be sure).
That error is caused by a select returning more than one row and
nothing else. I have just tested and it works as expected here with Fb
1.5.1: if the table has more than one qualifying row, then you get the
run time error, otherwise you don't.
Ciao
--
Nando Dessena
http://www.flamerobin.org
======================================================
I support Firebird, I am a Firebird Foundation member!
Join today at http://www.firebirdsql.org/ff/foundation
======================================================
h> I am getting the error "Multiple rows in singleton select" when i run
h> my stored procedure.
h> The stored procedure has a select statement
h> Select Field from Table where Value= InputValue into OutputValue.
h> Now i know what the error means. If the field has more than one
h> record where it is equal to the input value, it will give you that
h> error.
h> However, looking at the data, i know for sure there is only 1 record
h> for each value of this field.
either you are not so sure <g> or your database is somehow damaged (f.
ex. bad indexes - I'd try a validation through gfix just to be sure).
That error is caused by a select returning more than one row and
nothing else. I have just tested and it works as expected here with Fb
1.5.1: if the table has more than one qualifying row, then you get the
run time error, otherwise you don't.
Ciao
--
Nando Dessena
http://www.flamerobin.org
======================================================
I support Firebird, I am a Firebird Foundation member!
Join today at http://www.firebirdsql.org/ff/foundation
======================================================