MS SQL 2000 Query Help

Associate
Joined
3 Feb 2003
Posts
1,771
Location
Sydney, Australia
While I have a rudimentry understanding of sql queries what I want to do is beyond me.

I have two tables. artrx and artrxage

These tables have a similar identifying column in each. trx_ctrl_num

They also both share a column called account_code

I need an SQL query that will allow me to find records with the same trx_ctrl_num but different account_code and return the trx_ctrl_num of each of these records.


Any ideas?
 
Code:
SELECT artrx.trx_ctrl_num FROM artrx
INNER JOIN artrxage ON artrxage.trx_ctrl_num = artrx.trx_ctrl_num
WHERE artrxage.account_code <> artrx.account_code

maybe?
 
Back
Top Bottom