I want to run a query that will give me the amounts from two accounts with the same document name. I have a table created for each account (tables are named "171100" & "173100"), and created an Inner join between the tables on the column "Document" to run a query, but I get duplicate entries on the tables' Amount Column. The query looks like this in Datasheet View:
But the tables look like this:
In this case, the numbers are the same in both tables, but that's not always true for all of the docments listed in the tables. Here is the SQL view of my query:
Can anyone help? I'm stuck!
Code:
[B][U]DOCUMENT 171100.AMOUNT 173100.AMOUNT[/U][/B] 7280 ($324.50) $89.90 7280 $89.90 $89.90 7280 $500.00 $89.90 7280 ($324.50) $500.00 7280 $89.90 $500.00 7280 $500.00 $500.00 7280 ($324.50) ($324.50) 7280 $89.90 ($324.50) 7280 $500.00 ($324.50)
Code:
[B][U]DOCUMENT AMOUNT[/U][/B] 7280 $89.90 7280 $500.00 7280 ($324.50)
Code:
SELECT DISTINCTROW [171100].DOCUMENT , [171100].AMOUNT , [173100].AMOUNT FROM 171100 INNER JOIN 173100 ON ([171100].DOCUMENT = [173100].DOCUMENT) AND ([171100].DOCUMENT = [173100].DOCUMENT)
Comment