Subject | How can I combine these two queries into one? |
---|---|
Author | Anthony Tanas |
Post date | 2007-01-09T02:42:13Z |
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
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