Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 a problem with select in my Query

Author  Topic 

shahab
Starting Member

2 Posts

Posted - 2003-06-27 : 09:09:46
Hi ,
I have a MSAccess table:
name = quotes
example records =
Person_ID Cat_ID
1 00003
1 00007
2 00003 00005
3 00007
4 00003
3 00007
5 00007
5 00007

I want to select records where Person_ID is 1 or 3 and Cat_ID is like 00003 or 00007.
I used this Query but it doesent return any record! :

SELECT *
FROM Quotes
WHERE (Person_ID=3 Or Person_ID=4) AND (Cat_ID Like '%00003%' Or Cat_ID Like '%00004%');

PLZ somebody help me...

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-06-27 : 11:17:18
shahab,

use * instead of %. I.e., write *00003* It is Jet SQL.

Go to Top of Page

shahab
Starting Member

2 Posts

Posted - 2003-06-28 : 16:20:02
dear stoad ,
thanks alot.


Go to Top of Page
   

- Advertisement -