In SQL Editor, trying to put an like criteria for employee name after the date filter, but not working ,
WHERE (dates) between '2023-01-01' AND '2023-12-31'
AND [Name], 'Mark%'
Solved! Go to Solution.
Hi @balajivenkateshan.
Two things, you have a random comma between [Name] and 'Mark%' which is not okay.
Since you're using wildcards in SQL, isn't it common to use the LIKE operator here? I guess it depends on your flavour of SQL but it's what I've been exposed to before:
All the best,
Ben
Used your solution got the error as - "Expected Something between teh 'AND' keyword and the 'Select' Keyword
@balajivenkateshan what formula did you use in the SQL editor this time round? What RDMS are you connecting to i.e. Oracle/SQL/SQLlite/Postgres
All the best,
BS
@balajivenkateshan I hope you're using brackets here as well as you're chaining multiple ANDS together i.e:
WHERE (dates) between '2023-01-01' AND '2023-12-31'
AND [Name], 'Mark%'
should be:
WHERE ((dates) between '2023-01-01' AND '2023-12-31')
AND ([Name], 'Mark%')