to get latest version of product
-
Hi Friends I have table containing prd_id,version_no Now I want to get product,and their latest version_no how go about kindly help me regards chandru
-
dear chandru, i cannot understand ur question fully.if the version is an integer number u can draw the maximum value using max() function.can u pls describe ur question in detail
shally
Hi shally thank you for replying take for example i have these details in my table prd_id prD_name ver_no 01 abc 1.5 01 abc 2.4 02 xyz 1.0 02 xyz 1.2 02 xyz 2.0 03 xxx 1.0 04 yyy 2.0 i need latest version of each product like 01 abc 2.4 02 xyz 2.0 03 xxx 1.0 04 yyy 2.0 hope u understood thank you regards chandru
-
Hi shally thank you for replying take for example i have these details in my table prd_id prD_name ver_no 01 abc 1.5 01 abc 2.4 02 xyz 1.0 02 xyz 1.2 02 xyz 2.0 03 xxx 1.0 04 yyy 2.0 i need latest version of each product like 01 abc 2.4 02 xyz 2.0 03 xxx 1.0 04 yyy 2.0 hope u understood thank you regards chandru
-
hello chandru, pls use the following query if u find any errors pls reply me select prd_id,prD_name,max(ver_no) from products group by prd_id,prD_name :)
shally