
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2020 02:05 PM
Hello,
I'm trying to select only computers with specific names. My query is like this:
I'm trying to select only computers with specific names. My query is like this:
select ...
tables
FROM tblAssets
inner join
inner join
WHERE (tblAsset.AssetName = '%AAA%' or tblAsset.AssetName = '%BBB%' or tblAsset.AssetName = '%BBB%') ..... I do 6 filters but the result is showing only the first 3 or only 3 of the filtered assets. Also if one of them have NULL values, I want to show.
Could you please assist?
Thank you.
Labels:
- Labels:
-
Report Center
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2020 03:52 PM
If you're using wildcards ("%"), you want to do a LIKE comparison, not =.
WHERE (tblAsset.AssetName IS NULL
OR tblAsset.AssetName LIKE '%AAA%'
OR tblAsset.AssetName LIKE '%BBB%'
OR tblAsset.AssetName LIKE '%BBB%')
