-
Need help with SQL query
Hi all,
I've got an issue with my SQL query. The main issue is that I'm not sure what I'm asking.
I envision my query to work as such:
select * from MyTable where PrimayField = 'PrimaryValue' and SecondaryField = ('Val1', 'Val2', 'Val3')
I want the results to have all rows containing 'PrimaryValue' and the SecondaryField having 'Val1' or 'Val2' or 'Val3' as its field value.
Many thanks!
J
-
Try
select * from MyTable where PrimayField = 'PrimaryValue' and SecondaryField IN ('Val1', 'Val2', 'Val3')
-
Top man! Worked a treat. Thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules