c# - Find double records -


i have following structure:

tradeno | orderno | buy_sell |  1001        2001     buy 1002        2002     buy 1001        2001     sell     

in particular structure wanted find out double records of unique combinations of tradeno , orderno.

i tried following query:

select t1.tradeno,        t1.orderno,        t2.tradeno,        t2.orderno,        t1.buy_sell,        t2.buy_sell tradefile t1,      tradefile t2 t1.tradeno=t2.tradeno   , t1.orderno=t2.orderno 

this query , return me 2 copies of single records. wanted have repeated records finding. in above table first , second record repeated unique combination of tradeno , orderno [1001 , 2001].

please me out.

select tradeno, orderno tradefile  group tradeno, orderno having count(*) > 1 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -