Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Help SQL / REPORTS query

Help SQL / REPORTS query

From: Ade <amorr1_at_gwent*.nhs.gov.uk>
Date: Thu, 18 Feb 1999 16:52:06 GMT
Message-ID: <01be5b5f$26786e00$99018282@amorris.gwent.nhs.gov.uk>


Hi All

I have a report to write and part of thae report is to compare the data with a same period from last year I've written the SQL but I dont know how to link the two queries together. I've included the 2 queries. (I plan to use parameters for the dates - I can do that bit!)

Can any one offer advice (oracle 7.3 and reports 2.5)

TIA Ade

SQL1 select oh.OH_REFERERS_CODE, count(oh.OH_P_CRN) 'new count' from ORDER_HEADERS oh
where oh.OH_CLINIC_DATE>='01/01/1998' AND oh.OH_CLINIC_DATE<='01/01/1999' Group by oh.OH_REFERERS_CODE
Order by oh.OH_REFERERS_CODE

SQL2 select oh.OH_REFERERS_CODE, count(oh.OH_P_CRN) 'OLD count' from ORDER_HEADERS oh
where oh.OH_CLINIC_DATE>='01/01/1997' AND oh.OH_CLINIC_DATE<='01/01/1998' Group by oh.OH_REFERERS_CODE
Order by oh.OH_REFERERS_CODE Received on Thu Feb 18 1999 - 10:52:06 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US