I want to calculate the sum of the 2 queries' outcome.
For example, I would like display the sum of ANCAL and BSCAL.
<cfquery name="NCBMTCOUNT" datasource="abc">
SELECT COUNT(*) ANCAL
FROM NTN.DEMO D, NTN.XPT1 T
WHERE (D.MRN=T.MRN) AND T.XTYPE LIKE 'HT' AND D.HUB = 'NCAL'
</cfquery>
<cfquery name="SCBMTCOUNT" datasource="abc">
SELECT COUNT(*) BSCAL
FROM NTN.DEMO2 D, NTN.XPT2 T
WHERE (D.MRN=T.MRN) AND T.XTYPE LIKE 'CT%' AND D.HUB = 'SCAL'
</cfquery>
Will you help me?
For example, I would like display the sum of ANCAL and BSCAL.
<cfquery name="NCBMTCOUNT" datasource="abc">
SELECT COUNT(*) ANCAL
FROM NTN.DEMO D, NTN.XPT1 T
WHERE (D.MRN=T.MRN) AND T.XTYPE LIKE 'HT' AND D.HUB = 'NCAL'
</cfquery>
<cfquery name="SCBMTCOUNT" datasource="abc">
SELECT COUNT(*) BSCAL
FROM NTN.DEMO2 D, NTN.XPT2 T
WHERE (D.MRN=T.MRN) AND T.XTYPE LIKE 'CT%' AND D.HUB = 'SCAL'
</cfquery>
Will you help me?