Query not using criteria

  • Thread starter Thread starter Cydney
  • Start date Start date
C

Cydney

I know this is going to seem very vague.
For some reason my query that is accessing a table is not using the criteria
that I've given it. I'm hoping you can help me with WHY.

The Course_Code is a text field. It's very simple.

I've done it a million times with other databases and queries. I can't
understand why there's a problem with this one. Can you give me some clues of
where to look for the answer? The source is an external database that I've
connected to using an ODBC connection.

I've tried using a criteria for other fields. One works (a number/text
combination). The other fields don't at all either. Like even a date field
that is formated as "Date/Time" I can't seem to get a ">" or "Between"
criteria to work. However, I've been able to use DateDiff and DateAdd to get
other information out of the date --and that seems to work. But when I put
criteria on them, it ignores me --for the most part. It does seem to be doing
some "screening", but I can't understand it's logic.

My SQL:
SELECT Training.*
FROM Training
WHERE COURSE_CODE like "T106*";

I'll be amazed if you can help me find the answer...
 
For some reason my query that is accessing a table is not using the criteria
that I've given it.
Is it pulling all records or some of the records? Give an example of what
it is pulling and not pulling.
 
The plot thickens...
I've been testing and testing...
I've finally got it to work IF I have turned on the "Sum" for it to "Group
By" all records. weird. I think there's something wrong with the source
database (which I'll have to discuss with the "higher-ups"). I had noticed
that there were a lot of duplicate records previously, but wasn't concerned
as my intent was still to eliminate just those that didn't fall into my
criteria range. Could there have been an issue with the large number of
records? And duplicates?
 
I'm lost. You did not answer my question but came back with more varriables
in the mix.
 
Back
Top