473,326 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

compare values in a column in two tables with the same format

hi
i am looking for different values (quantity) in the same column in two tables with same format (same column headings).
One is the old version of our db and the other one is the new version.
These were originally excel files that i downloaded into Access as two tables and looked for unmatched records in them.
so 2 tables are exactly the same format but there has been some changes in the new table mainly quantity of the orders.
i appreciate any help :)
Apr 2 '08 #1
2 1274
jeffstl
432 Expert 256MB
hi
i am looking for different values (quantity) in the same column in two tables with same format (same column headings).
One is the old version of our db and the other one is the new version.
These were originally excel files that i downloaded into Access as two tables and looked for unmatched records in them.
so 2 tables are exactly the same format but there has been some changes in the new table mainly quantity of the orders.
i appreciate any help :)
Expand|Select|Wrap|Line Numbers
  1. select * from Table1,Table2 where Table1.QuantityValue <> Table2.QuantityValue and Table1.UniqueKey = Table2.UniqueKey
  2.  
This will return all records from both tables where the quantities are not the same

If you don't have the same identifiers for the data in both tables (a SSN, a Client Name, a Product ID, etc whatever) then I'm not sure.
Apr 2 '08 #2
Thanks much for your quick response. Here's what I did so far:

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT [Table A].Client_ID, [Table A].Client_Address, [Table A].Client_City, [Table A].Client_Gender, [Table A].Client_CaseNumber, [Table A].Cleint_DisputeQuantity, [Table B].Cleint_DisputeQuantity As Expr1
  3. FROM [Table A], [Table B]
  4. WHERE ( ([Table A].Cleint_DisputeQuantity<>[Table B].Cleint_DisputeQuantity) And ([Table B].Client_ID=[Table A].Client_ID));
  5.  
  6.  
When I run this query in Access, it prompts me to enter a value for (Table B.Client_DisputeQuantity). Any random value I enter it returns 24000 records, almost 3 times more than the original records in these tables.

Is there another syntax that might accomplish this task without asking for values to be entered?
Apr 3 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Programmer | last post by:
Hi All Here is my problem I'm using a SQLDataAdapter and DataSet I use the method FillSchema(myDataset, SchemaType.Source) The problem is that when i Check the default Values of the Dataset...
10
by: xixi | last post by:
we are using db2 udb v8.1 on windows, i would like to know whether we have tool or way to compare two tables on same database for data difference. thanks. (same ddl, different data, try to compare...
5
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
1
by: Mark | last post by:
by m.r.davies I have 2 tables on seperate Db's (and servers) I want to use a datareader on the first table to pick the booking ref, and then use that booking ref to query the 2nd DB when i have...
13
by: scorpion53061 | last post by:
Very urgent and I am very close but need a little help to get me over the edge........ I need to write these columns to a html file with each row containing these columns (seperated by breaks)....
20
by: MLH | last post by:
120 MyString = "How many copies of each letter do you need?" 150 MyVariant = InputBox(MyString, "How Many?", "3") If MyVariant = "2" Then MsgBox "MyVariant equals the string '2'" If...
11
by: Alan Mailer | last post by:
A project I'm working on is going to use VB6 as a front end. The back end is going to be pre-existing MS Access 2002 database tables which already have records in them *but do not have any...
3
by: mcolson | last post by:
I am trying to compare the last two values in the same column of a table. First of all, I have a column titled Row_Index that uses an index which starts at 1 and increments by 1. What I am trying...
1
by: metanarcissus | last post by:
"hi i have two excel spreadsheets (databases!) that have more than 8000 records in them. one is the old version (A) and one is the new version (B). the primary key (ID) is the name for all of...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.