Subject | RE: [firebird-support] How can I combine these two queries into one? |
---|---|
Author | Anthony Tanas |
Post date | 2007-01-09T03:02:49Z |
NM, I figured it out. I needed a UNION.
W. Anthony Tanas
Systems Analyst/Architect/Programmer
-------------------------------------------
Liquid Software Designs, Inc.
1300 Maynard Rd.
Ste. 102
Cary, NC 27511
-------------------------------------------
Phone: 919.244.3276
Fax: 866.394.5961
Email: anthony@...
Web: http://www.liquidsoftwaredesigns.com
<http://www.liquidsoftwaredesigns.com/>
-------------------------------------------
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Anthony Tanas
Sent: Monday, January 08, 2007 9:42 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] How can I combine these two queries into one?
SELECT DISTINCT
TRANSACTIONSET.TRANSACTIONSETID,
SUPERBILL.SUPERBILLID
FROM
SUPERBILL
INNER JOIN SUPERBILLITEM ON (SUPERBILL.SUPERBILLID =
SUPERBILLITEM.SUPERBILLID)
INNER JOIN JOURNAL ON (SUPERBILLITEM.JOURNALID =
JOURNAL.JOURNALID)
INNER JOIN TRANSACTIONSET ON (JOURNAL.TRANSACTIONSETID =
TRANSACTIONSET.TRANSACTIONSETID);
SELECT DISTINCT
TRANSACTIONSET.TRANSACTIONSETID,
SUPERBILL.SUPERBILLID
FROM
SUPERBILL
INNER JOIN SUPERBILLACTIVITY ON (SUPERBILL.SUPERBILLID =
SUPERBILLACTIVITY.SUPERBILLID)
INNER JOIN JOURNAL ON (SUPERBILLACTIVITY.JOURNALID =
JOURNAL.JOURNALID)
INNER JOIN TRANSACTIONSET ON (JOURNAL.TRANSACTIONSETID =
TRANSACTIONSET.TRANSACTIONSETID);
Thanks in advance,
Anthony
[Non-text portions of this message have been removed]
W. Anthony Tanas
Systems Analyst/Architect/Programmer
-------------------------------------------
Liquid Software Designs, Inc.
1300 Maynard Rd.
Ste. 102
Cary, NC 27511
-------------------------------------------
Phone: 919.244.3276
Fax: 866.394.5961
Email: anthony@...
Web: http://www.liquidsoftwaredesigns.com
<http://www.liquidsoftwaredesigns.com/>
-------------------------------------------
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Anthony Tanas
Sent: Monday, January 08, 2007 9:42 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] How can I combine these two queries into one?
SELECT DISTINCT
TRANSACTIONSET.TRANSACTIONSETID,
SUPERBILL.SUPERBILLID
FROM
SUPERBILL
INNER JOIN SUPERBILLITEM ON (SUPERBILL.SUPERBILLID =
SUPERBILLITEM.SUPERBILLID)
INNER JOIN JOURNAL ON (SUPERBILLITEM.JOURNALID =
JOURNAL.JOURNALID)
INNER JOIN TRANSACTIONSET ON (JOURNAL.TRANSACTIONSETID =
TRANSACTIONSET.TRANSACTIONSETID);
SELECT DISTINCT
TRANSACTIONSET.TRANSACTIONSETID,
SUPERBILL.SUPERBILLID
FROM
SUPERBILL
INNER JOIN SUPERBILLACTIVITY ON (SUPERBILL.SUPERBILLID =
SUPERBILLACTIVITY.SUPERBILLID)
INNER JOIN JOURNAL ON (SUPERBILLACTIVITY.JOURNALID =
JOURNAL.JOURNALID)
INNER JOIN TRANSACTIONSET ON (JOURNAL.TRANSACTIONSETID =
TRANSACTIONSET.TRANSACTIONSETID);
Thanks in advance,
Anthony
[Non-text portions of this message have been removed]