hi,
if 1 item has 2 transactions with different vendors and different prices,
eg: item A is bought from vendor A at $100, as well as from vendor B at
$110.
but my query gives:
item A with vendor A at $100
item A with vendor A at $110
item A with vendor B at $100
item A with vendor B at $110
why is this so?
Elsie
You've gotten three answers which you have ignored, so just in case
you misunderstand how these newsgroups work I'm posting a reply and
copying it to EMail - please reply *to the newsgroup* rather than to
the email.
When you create a Query joining two tables, every possible valid
combination of records is returned. You have not posted your table
structure nor have you posted the SQL of the query, so we're having to
guess - but let's say you have a table of Items with an ItemID; a
table of Vendors who sell that item; and a table of Transactions with
prices. If you have:
Items
ItemA
Transactions
ItemA
$110
ItemA
$100
Vendors
ItemA
VendorA
ItemA
VendorB
and create a query joining the three tables, you will get all four
possible combinations.
To get just a single record per transaction, you need to have a
VendorID field in the transactions table indicating which vendor was
involved *in this particular transaction*, rather than just having a
list of vendors who sell this item.
If your table structure is different than I've assumed, and if this
example doesn't help, please post back with details.