Hi everyone, i have a database with the information like:
id transId transType
1001 3001 1
1002 3002 1
1003 3002 0
1004 3005 1
1) 1001, 1002, 1003, 1004 is primary key
2) 3001, 3002 , 3003 is the order's invoice no.
3) 1,0 under trans type is their type: 1, is sales, 0 is cancel order
i wish to get this information from database, to display them at report
but i only want to display 1001, and 1004, meanwhile 1002, and 1003 to be excluded since thier transId is same (a customer make an order, and cancel by tat day so i don't want to display "zero result" record)
Can anyone help me to use sql to get a list from database ???which i don't want those 2 records to be displayed?
Many thanks...