all, using 2010. I have two tables. :
Code:
tblone:
cust_id
mtr_id
state
tbltwo:
cust_id
state
name
They both have the main field; cust_id in both tables. In table one; there is a mtr_id field which is associated with cust_id field. I need to match this field in table two. So I setup a query to do this which which works fine:
Code:
SELECT tblone.mtr_id, tblTwo.cust_id, tblTwo.CNAME, tblTwo.EFF_DTE, tblTwo.TAX_DESC, tblTwo.STATE, tblTwo.[rate], tblTwo.[Acctnum] tblTwo.Notes
FROM tblone LEFT JOIN tblTwo ON (tblone.State = tblTwo.STATE) AND (tblone.cust_id = tblTwo.cust_id);
Table one is kept updated by the user. My problem is in tblone; the user mixed up the fields. What I mean is; instead of putting the cust_id in the cust_id field; they put it in the mstr_id field. So now I have some records with the mstr_id field in the cust_id field and cust_id in the mstr_id field and my query is set up by joining the cust_id There are too many records; almost 10000 to correct this. So my question is does anyone know a way I can use the above query without having to use multiple queries to accomplish what I need. I hope I didn't confuse the issue. Thanks