Subject | Re: [ib-support] Re: DEAD LOCK ON SQL |
---|---|
Author | Svein Erling Tysvær |
Post date | 2002-06-12T12:04:54Z |
>btw, the syntax for the EXISTS() predicate isHuh? Helen, are you still having that headache or is there something I just
>
>SELECT U.URUN_KUTUK_ID
>, U.CARIID
>, U.MARKAID
>, U.URUN_KOD
>, U.URUN_AD_TR
>, U.URUN_AD_EN
>, U.GTIP
>FROM URUN_KUTUK U
>WHERE (EXISTS (
> SELECT I.GM_PART_NUMBER FROM INVOICE_DETAIL I
> WHERE I.INVOICE_MASTER_ID=437
> and I.GM_PART_NUMBER = U.URUN_KOD
>))
>
>However, EXISTS() won't work for you here. It will select either ALL of
>the rows (if there is a row in the table matching the subselect) or NONE of
>the rows (if there is no matching row). EXISTS() would help you if this
>query were in a stored procedure as a FOR SELECT query.
cannot see? In my mind, this query returns all rows having a URUN_KOD which
matches a GM_PART_NUMBER of records in INVOICE_DETAIL where the
INVOICE_MASTER_ID is 437 - i.e. probably some of the records. Records with
a different URUN_KOD will not be returned.
Confused yet again,
Set