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
|
|||
|
|||
Random Query?
Access 97
I have three single digit feilds and would like to query on only two of them however, the data is accross all three fields. Exsample: Query for 34 would return: 340 304 430 034 043 Can someone please let me know how I can get this to work, thanks! |
#2
|
|||
|
|||
Random Query?
On Sun, 23 May 2004 19:49:32 -0700, "Jenn"
wrote: Access 97 I have three single digit feilds and would like to query on only two of them however, the data is accross all three fields. Exsample: Query for 34 would return: 340 304 430 034 043 Can someone please let me know how I can get this to work, thanks! This suggests that your table isn't perfectly normalized - ordinarily one would want each field to refer to a distinct attribute of the record's entity! However, you can use a qury like SELECT * FROM yourtable WHERE (Field1 = 4 OR Field2 = 4 OR Field3 = 4) AND (Field1 = 3 OR Field2 = 3 OR Field3 = 3) In the query grid, I don't think you can get the parenthesis nesting this would require - open the SQL window and try this (changing to your own fielnames of course). For more flexibility, use [Enter first digit:] in place of 4 and [Enter next digit:] in place of 3. John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public |
Thread Tools | |
Display Modes | |
|
|