If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help with query. Must have D and have either E>=2000 OR etc.
Hello:
I'm having trouble with a query wherein I need e.g., all rows returned that are not null in Col D AND have either E=2000 OR F=1 OR G=1 OR H=1. I keep getting results back with Nulls in Col D. Not liking the "SQL" in Access . . . Sql Server is more straightforward . . . Any help will be appreciated! Sandy |
#2
|
|||
|
|||
Help with query. Must have D and have either E>=2000 OR etc.
If you are in the query design window...
under colD put Not Null Under Col E put =2000 On the next line (or) put... under colD put Not Null under ColF put 1 On the next line (OR) under colD put not null under G put 1 etc. You probably only have the 'not null' on one line. Rick B "Sandy" wrote in message ... Hello: I'm having trouble with a query wherein I need e.g., all rows returned that are not null in Col D AND have either E=2000 OR F=1 OR G=1 OR H=1. I keep getting results back with Nulls in Col D. Not liking the "SQL" in Access . . . Sql Server is more straightforward . . .. Any help will be appreciated! Sandy |
#3
|
|||
|
|||
Help with query. Must have D and have either E>=2000 OR etc.
SELECT * FROM TableName
WHERE [Col D] Is Not Null AND ([Col E] = 2000 OR [Col F] = 1 OR [Col G] = 1 OR [Col H] = 1); -- Ken Snell MS ACCESS MVP "Sandy" wrote in message ... Hello: I'm having trouble with a query wherein I need e.g., all rows returned that are not null in Col D AND have either E=2000 OR F=1 OR G=1 OR H=1. I keep getting results back with Nulls in Col D. Not liking the "SQL" in Access . . . Sql Server is more straightforward . .. . Any help will be appreciated! Sandy |
#4
|
|||
|
|||
Help with query. Must have D and have either E>=2000 OR etc.
You can go to the SQL view of your query and type in or modify the query as
you would in the SQL Query Analyzer. -- Duane Hookom MS Access MVP -- "Sandy" wrote in message ... Hello: I'm having trouble with a query wherein I need e.g., all rows returned that are not null in Col D AND have either E=2000 OR F=1 OR G=1 OR H=1. I keep getting results back with Nulls in Col D. Not liking the "SQL" in Access . . . Sql Server is more straightforward . .. . Any help will be appreciated! Sandy |
#5
|
|||
|
|||
Help with query. Must have D and have either E>=2000 OR etc.
Rick -
Thank you very much! Sandy |
#6
|
|||
|
|||
Help with query. Must have D and have either E>=2000 OR etc.
Duane -
Thanks for your response! Sandy |
#7
|
|||
|
|||
Help with query. Must have D and have either E>=2000 OR etc.
Thanks, Ken.
Access was throwing in so many parentheses, it got confusing. I knew it had to be simpler than Access was making it! Sandy |
Thread Tools | |
Display Modes | |
|
|