i have to find all the deals under certain conditions, and all those deals have sets of rate, i have to find most recent rate for each of them as well, am i able to do that simply use sql?
SELECT deals.deal_no, events.rate, mmdeals.fix_float
FROM deals, mmdeals, events
WHERE .... AND ( events .flow_no = (SELECT MAX(flow_no) FROM QuantumIreland.dbo.events events WHERE (events.comments = 'RATE SET')))
the code between 'WHERE .... AND' will find all the deals under certain conditions, and
the code after 'WHERE .... AND' will find the most recent rate, it is working only if i run it seperatly and with given deal_no. but i perfer put sql all together, that means if i run sql once, it will find most recent rate for all the deal.
hope u will get what i'm saying, thanks for any help!
SELECT deals.deal_no, events.rate, mmdeals.fix_float
FROM deals, mmdeals, events
WHERE .... AND ( events .flow_no = (SELECT MAX(flow_no) FROM QuantumIreland.dbo.events events WHERE (events.comments = 'RATE SET')))
the code between 'WHERE .... AND' will find all the deals under certain conditions, and
the code after 'WHERE .... AND' will find the most recent rate, it is working only if i run it seperatly and with given deal_no. but i perfer put sql all together, that means if i run sql once, it will find most recent rate for all the deal.
hope u will get what i'm saying, thanks for any help!