If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to find out the difference between two tables?
Dear all,
My mother-tongue is not english.So if there's something I cann't express clear,pls be tolerant,thanks. There are two tables,with the same field definations, but not all same records.assuming table A is a snapshot of 2008-2-29,Table B is a snapshot of 2008-3-21.the key field in both table is AccountNO. I try to use access 2003 to find out what accounts have been opened between 2008-2-29 and 2008-3-21. Up to now ,I only have the experience to use the parameter "join",but this case,I need to find out the difference. Can u do me a favor ,as to show me how to solve it in access 200? ? pls also give me a sql sentence. many thanks. |
#2
|
|||
|
|||
How to find out the difference between two tables?
To show records with an AccountNo in TableB that does not exist in TableA use
a "frustrated" outer join. For example SELECT TableB.* FROM TableB LEFT JOIN TableA ON TableB.AccountNo = TableA.AccountNo WHERE TableA.AccountNo is Null John Spencer Access MVP 2002-2005, 2007-2008 Center for Health Program Development and Management University of Maryland Baltimore County Dawn wrote: Dear all, My mother-tongue is not english.So if there's something I cann't express clear,pls be tolerant,thanks. There are two tables,with the same field definations, but not all same records.assuming table A is a snapshot of 2008-2-29,Table B is a snapshot of 2008-3-21.the key field in both table is AccountNO. I try to use access 2003 to find out what accounts have been opened between 2008-2-29 and 2008-3-21. Up to now ,I only have the experience to use the parameter "join",but this case,I need to find out the difference. Can u do me a favor ,as to show me how to solve it in access 200? ? pls also give me a sql sentence. many thanks. |
#3
|
|||
|
|||
How to find out the difference between two tables?
Dawn,
You can use the query wizard to do this. Select Queries and new in the database window. Then click the "Find Unmatched Query Wizard" option in the list box, then click OK. The wizard will ask you which two tables to compare, then it will ask you which fields to compare, and finally will ask you which fields you want to display. When you are done, take a look at the SQL view of the query. It should look similar to what John posted. HTH Dale -- Don''t forget to rate the post if it was helpful! email address is invalid Please reply to newsgroup only. "Dawn" wrote: Dear all, My mother-tongue is not english.So if there's something I cann't express clear,pls be tolerant,thanks. There are two tables,with the same field definations, but not all same records.assuming table A is a snapshot of 2008-2-29,Table B is a snapshot of 2008-3-21.the key field in both table is AccountNO. I try to use access 2003 to find out what accounts have been opened between 2008-2-29 and 2008-3-21. Up to now ,I only have the experience to use the parameter "join",but this case,I need to find out the difference. Can u do me a favor ,as to show me how to solve it in access 200? ? pls also give me a sql sentence. many thanks. |
#4
|
|||
|
|||
How to find out the difference between two tables?
Dear John & Dale,
Thanks for your kindness.no matter what you help me for,u both really do me a favor.As a chinese ,I welcome u to go to Beijin for the Olympics. Many thanks,again. YOurs,Dawn |
Thread Tools | |
Display Modes | |
|
|