Subject | Re: [firebird-support] Is such a CASE WHEN usage allowed? |
---|---|
Author | Arno Brinkman |
Post date | 2012-04-12T08:16:24Z |
Hi,
What about:
SELECT
tSaleinvoice.*
FROM
tSaleInvoice
WHERE
EXISTS(SELECT * FROM tSaleInvoiceCvrLtr WHERE tSaleInvoice.iID =
tSaleInvoiceCvrLtr.cSaleInvIDs and tSaleInvoiceCvrLtr.iID = :vp_iID) or
(iBuyerID = :iBuyerID AND tSaleInvoice.tDt = :tDt)
Regards,
Arno Brinkman
What about:
SELECT
tSaleinvoice.*
FROM
tSaleInvoice
WHERE
EXISTS(SELECT * FROM tSaleInvoiceCvrLtr WHERE tSaleInvoice.iID =
tSaleInvoiceCvrLtr.cSaleInvIDs and tSaleInvoiceCvrLtr.iID = :vp_iID) or
(iBuyerID = :iBuyerID AND tSaleInvoice.tDt = :tDt)
Regards,
Arno Brinkman