I have query that is and I have executed the query..
first is the TXN_HEADER table .
select * from TXN_HEADER where txhd_receipt_id = 'receipt_id_val' and till_short_desc = 'till_no_val'
from the above TXN_HEADER table we get the transaction_no value ( e.g. txhd_txn_nr) which is used to find the transactional details in TXN_DETAIL table.
select * from TXN_DETAIL where txhd_txn_nr = 'transaction_no_val' and till_short_desc = 'till_no_val
My query is that I am writing these queries seprately can you guys please advise by which I can combine them into single query by any means , I means through subquery , through joins . please advise.