Subject | Re: [IBO] OrderingItems not working |
---|---|
Author | Svein Erling Tysvaer |
Post date | 2002-12-11T09:20:38Z |
Kenneth,
At 03:21 11.12.2002 +0000, you wrote:
the HERBAL_WITH_CAT table regardless of whether they match HERBAL or not,
and then you don't select anything from that table? If you had returned
anything from that table, I'd say your KeyLinks were wrong (KeyLinks shall
uniquely identify a row within the result set, and even though NULLs are
different from any value, I don't think they make valid KeyLinks). I guess
what you want is an [INNER] JOIN. Remove RIGHT from your query and you will
get all records in HERBAL that match in HERBAL_WITH_CAT and ALL_HERBAL.
This also makes your KeyLinks sensible.
HTH,
Set
At 03:21 11.12.2002 +0000, you wrote:
>SELECT H.REFNOthis doesn't make sense. Using RIGHT [OUTER] JOIN returns all records in
> , A.NAME
> , A.STROKE
> , A.S_CODE
> , H.DOSAGE
> , H.CHARACTERISTIC
> , H.SYSTEM
> , H.FUNC
> , H.USES
> , H.REMARK
>FROM HERBAL H
>RIGHT JOIN HERBAL_WITH_CAT HC
>ON HC.H_REFNO = H.REFNO
>JOIN ALL_HERBAL A
>ON A.REFNO = H.REFNO
>
>The Keylinks are HERBAL.REFNO and ALL_HERBAL.NAME which is the
>primary key for table HERBAL and table ALL_HERBAL respectively.
the HERBAL_WITH_CAT table regardless of whether they match HERBAL or not,
and then you don't select anything from that table? If you had returned
anything from that table, I'd say your KeyLinks were wrong (KeyLinks shall
uniquely identify a row within the result set, and even though NULLs are
different from any value, I don't think they make valid KeyLinks). I guess
what you want is an [INNER] JOIN. Remove RIGHT from your query and you will
get all records in HERBAL that match in HERBAL_WITH_CAT and ALL_HERBAL.
This also makes your KeyLinks sensible.
HTH,
Set