Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use 2 difference sql query in a report

Status
Not open for further replies.

yapafly

MIS
Jun 2, 2008
7
Hi, All
i hope someone can help me..
Within a single report, how to put 2 difference sql query in 2 difference table.
User only need insert the parameter(@ParticipantID)once and the 2 table will generated .

detail:
oracle databases name: npcrpt

sql code 1:
EXEC ('
SELECT XNP_PORT_DATA.RECIPIENT_ID,XNP_PORT_DATA.DONOR_ID
FROM XNP_PORT_DATA ..
WHERE XNP_PORT_DATA.RECIPIENT_ID LIKE UPPER(?)', @ParticipantID) AT npcrpt ;


sql code 2:
EXEC ('
SELECT XNP_PORT_DATA.RECIPIENT_ID, XNP_PORT_DATA.DONOR_ID
FROM XNP_PORT_DATA ..
WHERE XNP_PORT_DATA.DONOR_ID LIKE UPPER(?)', @ParticipantID) AT npcrpt ;


i hope someone can help me..thanks
 
Go to the DataSets tab and create 2 data sets rather than 1 - you can use the same parameter in each

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Thanks,Geoff..
now i make it..

Thanks you very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top