In Database Desktop, the help on Local SQL contains the following (under
DML statements, FROM clause):
>The next statement specifies a left outer join for table_reference:
>
>SELECT * FROM PARTS LEFT OUTER JOIN INVENTORY
> ON PARTS.PART_NO = INVENTORY.PART_NO
So that's what you want.
This is equivalent to
SELECT *
FROM PARTS, INVENTORY
WHERE PARTS.PART_NO = INVENTORY.PART_NO
UNION
SELECT *, <a bunch of nulls>
FROM PARTS
WHERE NOT EXISTS (
SELECT 1
FROM INVENTORY
WHERE PARTS.PART_NO = INVENTORY.PART_NO)
That's in case you wanted to do it the hard way. :)
Cheers,
Carl Reynolds Ph: +64-9-4154790
CJN Technologies Ltd. Fax: +64-9-4154791
[EMAIL PROTECTED] DDI: +64-9-4154795
PO Box 302-278, North Harbour, Auckland, New Zealand
12 Piermark Drive, North Harbour Estate, Auckland, NZ
Visit our website at http://www.cjntech.co.nz/
> -----Original Message-----
> From: Mark Derricutt [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, July 01, 1999 2:40 PM
> To: Multiple recipients of list delphi
> Subject: Re: [DUG]: SQL Joins...
>
> --On Thursday, July 01, 1999, 2:31 PM +1200 Kerry Sainsbury
> <[EMAIL PROTECTED]> wrote:
>
> > You need to perform an 'outer join' on your ScreenAttr table. The
> exact
> > syntax for this kind of join seems to fluctuate wildly, depending on
> your
> > database engine -- look it up :-)
>
> Currently it's Paradox, hopeing to move to interbase in the future,
> and the
> only docs I have on SQL is "SQL for Dummies" which is already
> confusing me
> :P
>
> ----------------------------------------------------------------------
> -----
> New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
application/ms-tnef