Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Criteria/Relationship problems in MSAccess97 query on Oracle7 linked table
I am trying to query an Oracle7 table from Access97. My criteria is
on a numeric field (LOT_NO) in a large table of production data
(LOT_PROD). I'm trying to get all records that have a LOT_NO > 8700.
I put ">8700" in the criteria in the Access query, and I get records
back starting with LOT_NO 7626. This query used to work perfectly. I
figured maybe I had an Access glitch, and tried rebuilding the query
from scratch, with the same result.
I logged in to our database server, fired up sqlplus, and ran SELECT COUNT(*) FROM LOT_PROD; and got 9768543, then I ran SELECT COUNT(*) FROM LOT_PROD WHERE LOT_NO > 8700; and got 473235. I know that there should be a valid subset. I also know that the records I'm looking for should have a PROD_DATE of 12/14/01 at the earliest.
I have another table (LOT_DATA) that uses LOT_NO as its primary key, so I set up a relationship in Access between the LOT_NO fields, added the LOT_NO field from LOT_DATA to the query, and tried using that as my criteria. Then end result was odd:
LOT_PROD.LOT_NO LOT_DATA.LOT_NO PROD_DATE
7630 8701 8/27/01 7626 8701 8/27/01 7632 8701 8/28/01 7626 8701 8/27/01 7630 8701 8/27/01 7724 8702 9/7/01 7633 8702 8/28/01 7633 8702 8/28/01 7633 8702 8/28/01etc...
I tried moving to a different PC and running it from there, with identical results. I'm not sure what to do next. Actually, I'm at a total loss. Any help would be greatly appreciated.
Thanks,
Bob
rhaje1_at_yahoo.com
Received on Fri Jan 04 2002 - 15:06:28 CST
![]() |
![]() |