Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

query to print the max value of time of the latest record from table

581148Jun 7 2007 — edited Jun 8 2007
hi
i wrote this query
which should return max fx_time of the latest or current value of fx_date
plz help
this wuery is giving current date fx_date but with all values not the max value of fx_time.


select FX_DATE, FX_TIME,FROM_CURRENCY, TO_CURRENCY, ASK_RATE, BID_RATE,
time_stamp, source,
DESCRIPTION, FX_TYPE, OVERRIDDEN_RATE, OVERRIDDEN_BY, OVERRIDDEN_DATE ,
ASK_RATE_INVERSE, BID_RATE_INVERSE, PX_LAST, PX_MID, PX_OPEN, PX_HIGH,
PX_LOW,NY_TIME_OF_LAST_PRICE_UPDATE,
DATE_OF_LAST_UPDATE, PX_BID_AM, PX_ASK_AM, PX_BID_PM, PX_ASK_PM, PX_CLOSE_1D,
CHG_NET_1D,
CHG_PCT_1D, PRICING_SOURCE, PX_BID_1M, PX_ASK_1M, PX_BID_1YR, PX_ASK_1YR,
PX_CLOSE_MTD,
PX_CLOSE_YTD, FXOPT_COMMODITY_CCY, FXOPT_SPOT_FXRATE, SPOT_RT_USD_FLAG,
PRIOR_CLOSE_BID,
PRIOR_CLOSE_MID, PRIOR_CLOSE_ASK from CURRENCY_EXCHANGE_TXN
WHERE
source='BLOOMBERG'
AND FX_DATE=
(select max(fx_date) JIM from CURRENCY_EXCHANGE_TXN
,(select max(fx_time) TIM from CURRENCY_EXCHANGE_TXN GROUP BY FX_TIME )
)

what change should i do
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 5 2007
Added on Jun 7 2007
13 comments
769 views