PDA

View Full Version : Report Filter criteria



dave
11-01-2006, 05:04 AM
I am trying to filter a report for my spec items. I have created a field called SKID and need to see multiple skids on a report. Right now I have it like this:

and [skid] like "18" and [skid] like "19"

That doesn't work. What is the proper syntax for that?

Thanks!

dave
11-01-2006, 05:15 AM
I did a little research and this is what I came up with:

and [skid] between "17" and "19"

works ok but it's still just a work around.

Data Wrangler
11-01-2006, 06:08 AM
Why is that a work around?

D

dave
11-01-2006, 06:12 AM
because I just need 17 and 19, not 18 :)

Data Wrangler
11-01-2006, 09:32 AM
in your first post, why do you have the first and?

D

dave
11-01-2006, 09:58 AM
because it was a continuation of the filter. I found out that it's really the "or" command that does it. [skid] like "17" or "19"

That worked :) I think there is a more efficient way to do it though.

Data Wrangler
11-01-2006, 10:08 AM
I was about to say OR :)

D

tw_echo
11-01-2006, 10:55 AM
Dave,
You could try the IN clause, for example:

SELECT Table1.id, Table1.skid
FROM Table1
WHERE (((Table1.skid) In ('18','19','20')));

I am not sure that this helps you...

Tim...

dave
11-30-2006, 09:12 AM
Tim, can I put that right into the filter criteria of a report??