> hmmm from memory also  I dont think delphi sql handles joins.
>
> I believe when I was doing stuff like this I had to take the result set
> from the first and load these into variables and then pass these to a
> seperate query...

Mark is talking DBISAM which has a good SQL implementation. The word JOIN
was misused in this context and UNION should be the requirement here.

ie;

SELECT staff.name, pay.Salary
FROM staff
JOIN pay on pay.staffid = staff.staffid

as opposed to

SELECT staff.name, pay.Salary
FROM staff
JOIN pay on pay.staffid = staff.staffid
UNION
SELECT casual.name, pay.Salary
FROM casual
JOIN pay on pay.casualid = casual.casualid

This will join two queries into one single result set SO LONG AS the
selected fields are identical in both selects.

Steve Peacocke
Lecturer, NZ Diploma in Business
Lecturer, Batchelor of Computing Systems
Waiariki Institute of Technology



---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to