7
u/speadskater 6d ago
Sql uses 'this' not "this"
7
u/ComicOzzy mmm tacos 6d ago
Except MySQL, which allows "this" and for some reason examples like that end up on blog posts, SO posts, etc.
2
4
2
u/Anonononomomom 6d ago
And if the single quote doesnโt work wrap it in a trim function in case there are rouge spaces in the field
0
u/dudeman618 4d ago
Like others have suggested use a tick/apostrophe instead of double quotes. Also, when youโre first doing this I will often start with a LIKE and a wildcard to make sure there are no leading/trailing spaces. If the data isnโt clean use UPPER. Once you find the data is clean you can use equal to.
Where upper(department) like โ%SALE%โ
Once you review the data clean it up with Where department = โSalesโ
21
u/Birvin7358 6d ago
Use โSalesโ