-
sql query
Hi,
I have the below query
select substr(a.instrumentid,1,30) InstrumentID, a.lastsaleprice, a.outstandingshares, b.close, c.outstandingshares, d.lastexecprice
from tibex_instrumentindexmap a, tibex_instrumentdailyhist b, tibex_instrumentissue c , tibex_instrument d
where b.tradeyear = 2003 and b.trademonth = 01 and b.tradeday = 28
and a.INSTRUMENTID = b.INSTRUMENTID
and a.OUTSTANDINGSHARES = c.outstandingshares
and a.instrumentid=d.instrumentid
-- and d.statsgroup=1
and a.lastsaleprice <> d.lastexecprice
order by a.instrumentid
/
and a.lastsaleprice <> d.lastexecprice
The application her needs to raise an alert in the two columns do not match and a.lastsaleprice <> d.lastexecprice from the above query I can find the mismatches e.g prices that differ but am not sure how to write it out e.g if I had a stored proc I could have an exception with dbms_output to a file. I am not very strong at pl/sql
some need some expert advice. Hope this is clear.
Thanks in advance..
Marlon..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|