A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Random Query?



 
 
Thread Tools Display Modes
  #1  
Old May 24th, 2004, 03:49 AM
Jenn
external usenet poster
 
Posts: n/a
Default 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  
Old May 24th, 2004, 04:55 AM
John Vinson
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.