Querying a Decimal Field
Posted on 2003-11-26
I'm trying to query a Sales History Table linked to my access database through ODBC.
Period (Decimal,2 precision, 0 scale)
Year (Decimal, 4 precision, 0 scale)
When I query the table with no filters, I get all 42,000 records. For 2002, there should be 7060 records. When I specify 2002 for the Year, I only get 1590 records. I'm thinking this has something to do with the decimal field type.
SELECT OESLSHST.HIST_PERIOD, OESLSHST.HIST_YEAR, OESLSHST.CUST_NO, OESLSHST.ITEM_NO INTO tblSALES
Creates a table to speed up access, which I delete later when it's no longer needed.
When I include a transfer spreadsheet command in the code I get all 42,000 records with no filter. In excel, I can then filter on the Year field and I get 7060 records, so I know the records are in the table. I just don't know why the above query isn't retrieving all 7060 records.