Weird return of Information (1 Viewer)

krc547

Member
Local time
Today, 01:24
Joined
Sep 1, 2023
Messages
38
I have a table and I created a query that I wanted it to pull a certain type from the field for the fiscal year that was asked. In my criteria I had "Fixed", then I decided I needed to see "Special" as well so I added it to the or field in the query and then it returned not just fiscal 2023 which is what was asked for but all the way back to fiscal year 2017. I included before and after screen shots for this.

Before adding Special:
1700248275637.png

1700248292309.png


After adding Special
1700248319454.png

1700248335182.png


Any ideas on what I did wrong?
 

krc547

Member
Local time
Today, 01:24
Joined
Sep 1, 2023
Messages
38
Worker perfect! Thank you
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 01:24
Joined
Feb 28, 2001
Messages
27,186
Should be noted that, if it is desired to somehow segregate the return-set according to the TYPE field, you need TWO query columns naming the same field... one with GROUP BY (and no criteria) and one with WHERE (and the two options you wanted to see.)

As a side note... your field "TYPE" uses a reserved word as its name. This could lead to syntax ambiguity, which could lead to wonky results.

 

Users who are viewing this thread

Top Bottom