Subject Re: [ib-support] Still have problems updating many-to-many in SP
Author Nick Upson
you need to decide which value for InvHead.Inv_Nmbr you want
to use in the update, the database is confused when
the sub_select (the part inside brackets) has more than one
result. This would not have the same error, for example

Update Delitems
Set Inv_Nmbr=(Select max(InvHead.Inv_Nmbr) From InvHead
Inner Join DelItems DI on DI.Acno=InvHead.Acno
Where DI.Delivered='N'
And InvHead.Delivered='N')

but may not do what you require

>Also when there is more than 1 DelItem this error occurs
>
>Multiple rows in singleton select
>
>Update Delitems
>Set Inv_Nmbr=(Select InvHead.Inv_Nmbr From InvHead
>Inner Join DelItems DI on DI.Acno=InvHead.Acno
>Where DI.Delivered='N'
>And InvHead.Delivered='N')


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com