Need to combine two queries
From: Marco <silvam23_at_hotmail.com>
Date: 9 Jul 2001 11:49:56 -0700
Message-ID: <64082624.0107091049.3d3239f9_at_posting.google.com>
Date: 9 Jul 2001 11:49:56 -0700
Message-ID: <64082624.0107091049.3d3239f9_at_posting.google.com>
Hi, I need two combine these two quieries but I am havin a difficult
time trying to do so.
Select SUM ( AMOUNT ) AMOUNT, OPT_NUM from MARCO2.esp_transactions
where EXISTS ( SELECT optionee.OPT_NUM FROM MARCO2.optionee WHERE
esp_transactions.OPT_NUM = 1 AND optionee.OPT_NUM =
esp_transactions.OPT_NUM ) AND TRANS_TYPE >= 256 AND OFFER_NUM =
1 group by OPT_NUM
Select SUM ( AMOUNT ) AMOUNT, OPT_NUM from MARCO2.esp_transactions
where EXISTS ( SELECT optionee.OPT_NUM FROM MARCO2.optionee WHERE
esp_transactions.OPT_NUM = 1 AND optionee.OPT_NUM =
esp_transactions.OPT_NUM ) AND TRANS_DT <= '2001-07-09' AND
TRANS_TYPE < 256 AND OFFER_NUM = 1 group by OPT_NUM
Any ideas?
Received on Mon Jul 09 2001 - 20:49:56 CEST