Subject | Re: [ib-support] Re: Order by Going wrong |
---|---|
Author | Helen Borrie |
Post date | 2002-09-06T14:10:23Z |
At 01:52 PM 06-09-02 +0000, you wrote:
SELECT waybill.waybill, waybill.waydate, ETC
FROM waybill
LEFT OUTER JOIN place ON (waybill.destplace = place.place)
LEFT OUTER JOIN pod ON (waybill.waybill = pod.waybill)
WHERE invoice = 65259 <--- which table?
ORDER BY waybill.waydate, waybill.waybill
then you still have an ambiguity problem with invoice - which table does it
belong to?
Also, your prime ordering by a date column is likely to cause your
perceived "randomness" unless the column is a dialect 3 DATE type. They
will come out in creation order (to the thousandths of a second) won't
they, and will all be different, and the secondary ordering column won't
even come into the picture.
heLen
>IB6.0if your query is still
>
>What can be ambiguos once I changed the Order By... to
>ORDER BY waybill.waydate, waybill.waybill ??
SELECT waybill.waybill, waybill.waydate, ETC
FROM waybill
LEFT OUTER JOIN place ON (waybill.destplace = place.place)
LEFT OUTER JOIN pod ON (waybill.waybill = pod.waybill)
WHERE invoice = 65259 <--- which table?
ORDER BY waybill.waydate, waybill.waybill
then you still have an ambiguity problem with invoice - which table does it
belong to?
Also, your prime ordering by a date column is likely to cause your
perceived "randomness" unless the column is a dialect 3 DATE type. They
will come out in creation order (to the thousandths of a second) won't
they, and will all be different, and the secondary ordering column won't
even come into the picture.
heLen