Subject Re: [firebird-support] Simple re-entrant join .. interested only on the values with 'NULL' on right.
Author Dimitry Sibiryakov
> I try:
> Select D.ANIMALID, D.ANIMALIDENTIFICATION as DAMIDENTIFICATION, D.ANIMALGENDER, D.ANIMALDOB,
> C.ANIMALDAMID, C.ANIMALIDENTIFICATION as CALFIDENTIFICATION
> FROM ANIMAL D
> LEFT JOIN ANIMAL C
> ON D.ANIMALIDENTIFICATION = C.ANIMALDAMID
> WHERE D.ANIMALGENDER = 'F'
> ORDER BY C.ANIMALDAMID
>
> By ordering by C.ANIMALDAMID, all the records with no 'Right' values ie padded with 'NULL' are listed first.
>
> I'm actually only interested in these, ie these animal have not yet calved.

And what prevent you from adding "AND C.DAMIDENTIFICATION IS NULL" to
WHERE clause?

SY, SD.