Dear friends
I want to select he the record whose date is max , currently i had written the query in the following way, i would like to know is there any other method where always i can getting the correct data with the latest date.
SELECT T."PRODUCT_CODE",T."PRODUCT_DESCRIPTION",T."CUSTOMER",T."CUSTOMER_NAME",T."CONSIGNEE",T."CONSIGNEE_NAME",T."SALES_UOM",T."PRICE_UOM",T."RAT E",T."CURRENCY_CODE",T."EFFECTIVE_FROM",T."DISCOUNT_TYPE",T."DISCOUNT_VALUE",T."VAT",T."VAT_PER",T."STATUS",T."ADD_DATE",T."MOD_DATE",T."ADD_USER", T."MOD_USER"
FROM fds_customer_rate T
WHERE Effective_from=
(SELECT MAX(Effective_from)
FROM fds_customer_rate
WHERE Product_Code=T.Product_Code);
Sanjay