Subject Re: [ib-support] Update weird problem
Author Helen Borrie
At 09:44 AM 1/03/2003 -0400, you wrote:
>Hi,
>
> > At 06:11 AM 1/03/2003 -0400, you wrote:
> >>Hi,
> >>
> >>This problem is puzzling me. I'm using FB 1.0 Windows. And, I'm only
> >>getting this problem with one of my client's database.
> >>
> >>The error message is:
> >>"Multiple rows in singleton select"
> >>
> >>And, here's the puzzling statement, that is generating the error:
> >>UPDATE CLIENTS
> >>SET GARANTOR_NO=CLIENTNO,
> >> GUARANTOR_SELF='T'
> >>WHERE (GUARANTOR_SELF IS NULL)
> >> OR (GARANTOR_NO IS NULL)
> >> OR (GARANTOR_NO<1)
> >>
> >>Any insight to the problem would be appreciated.
>
> > Does this happen to be an EditSQL statement associated with a dataset
> > (cached or not)?
>
>I get the error with TIB_DSQL.ExecuteImmediate, within QuickDesk,
>TIB_Query.EditSQL and FB's command-line ISQL.

In EditSQL this statement *will* cause the error because you can only do a
searched update on Dataset.Edit, or call a parameterised stored procedure
that takes the current row keys as input. But, if you're getting it outside
of the current-row context as well, then Luiz has probably fingered the
source - a trigger somewhere that contains a subselect involving guarantor_no.

heLen