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
|
|||
|
|||
WHERE
Can somebody please explain how WHERE works and under what circumstances it
should be used? I've found that it works for some of the things I want, but I would like to know if there is a way to know when to use WHERE. Thanks Sue ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...access.queries |
#2
|
|||
|
|||
WHERE
Sue
I can't tell from your description, but suspect you are trying to write SQL statements to work as queries. In MS Access, you can create queries in design view and not need to focus on the SQL (unless you wish to). Regards Jeff Boyce Microsoft Office/Access MVP "skr" wrote in message ... Can somebody please explain how WHERE works and under what circumstances it should be used? I've found that it works for some of the things I want, but I would like to know if there is a way to know when to use WHERE. Thanks Sue ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...access.queries |
#3
|
|||
|
|||
WHERE
WHERE in a query applies criteria against fields to return records that
match the criteria. Basically when you don't want ALL the records returned, you use a where clause. This starts to get complicated when you use multiple criteria. You can say that all the criteria must be met (WHERE A = 1 and B=2) or you can say that any of the criteria must be met (WHERE A=1 or B=2) or you can make it more complicated and combine things WHERE A=1 AND (B=2 or C=5) So a record is returnd if A =1 and if B=2 or C=5. Move the parenthese WHERE (A=1 AND B=2) or C=5) and a record is returned if a=1 and b=2 or if C = 5 That very, very lightly scratches the surface of what where does in a query. There are multiple operators you can use - equal, not equal, less than, more than, and like are the more common ones. '================================================= === John Spencer Access MVP 2002-2005, 2007 Center for Health Program Development and Management University of Maryland Baltimore County '================================================= === skr wrote: Can somebody please explain how WHERE works and under what circumstances it should be used? I've found that it works for some of the things I want, but I would like to know if there is a way to know when to use WHERE. Thanks Sue ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...access.queries |
Thread Tools | |
Display Modes | |
|
|