Click here to Skip to main content
16,007,163 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to in operator used value in selected table join value take

SQL
WITH cte AS 
(SELECT *, ROW_NUMBER() 
OVER (PARTITION BY list_id ORDER BY list_id DESC) AS rn FROM Products WHERE CategoryID in (select * from category_list)SELECT * FROM cte WHERE rn = 1 and category='couple'  order by cartid;
Posted
Updated 12-May-15 23:03pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900