barkley1979
Technical User
Using MS Query to extract data from our SQL database into Excel. Here is an excerpt from a piece of my SQL code:
...
WHERE
(WODRAW.MENUOPTION='11') OR (WODRAW.MENUOPTION='02')
...
I have a primary key of WONUM. The code above will obviously bring out any lines where MENUOPTION is 11 or 02. This results single lines and multiple lines.
I need to be able to show only records (WONUM) where there is a MENUOPTION 11 and 02.
For example:
WONUM MENUOPTION
12456 11
12456 02
12467 11
12468 02
12469 02
Is the data I currently receive.
I want to only see
WONUM MENUOPTION
12456 11
12456 02
Any help would be appreciated.
...
WHERE
(WODRAW.MENUOPTION='11') OR (WODRAW.MENUOPTION='02')
...
I have a primary key of WONUM. The code above will obviously bring out any lines where MENUOPTION is 11 or 02. This results single lines and multiple lines.
I need to be able to show only records (WONUM) where there is a MENUOPTION 11 and 02.
For example:
WONUM MENUOPTION
12456 11
12456 02
12467 11
12468 02
12469 02
Is the data I currently receive.
I want to only see
WONUM MENUOPTION
12456 11
12456 02
Any help would be appreciated.