There is a table on the Oracle server that I link to using ODBC, OrderDetails, and another table in my Access Database that I'm using in a query together, Order. i've built this as a Query and as a recordset in my VBA code and it should return different 37 rows but it returns 37 rows that look like copies of the first row.
Query:
This returns 37 rows of:
OrderId Item Cost
12345 Bread 2
12345 Bread 2
12345 Bread 2
12345 Bread 2
12345 Bread 2
....
when it should return:
OrderId Item Cost
12345 Bread 2
12345 Coffee 4
12345 Milk 3
...
When I instead run an Make-Table query, it does add the correct 37 distinct rows to a new table. I can't figure out why I'm receiving the first result of same rows by running the query. Help please!
Query:
Code:
select OrderDetails.*
from Order
Inner Join OrderDetails on Order.id = OrderDetails.OrderId
where Order.id = 12345;
OrderId Item Cost
12345 Bread 2
12345 Bread 2
12345 Bread 2
12345 Bread 2
12345 Bread 2
....
when it should return:
OrderId Item Cost
12345 Bread 2
12345 Coffee 4
12345 Milk 3
...
When I instead run an Make-Table query, it does add the correct 37 distinct rows to a new table. I can't figure out why I'm receiving the first result of same rows by running the query. Help please!