You need to sign in to do that
Don't have an account?

NOT EQUAL operator IN SOQL for picklist values
How to use not qual to operator in SOQL
In sql, fieldname !='%xyz%'
how about soql?
here am trying to check for the picklist values.
Thanks in advance
In soql you can use as follows
Select Id, Name from opportunity where StageName != 'closed' limit 10
Select Id, Name from opportunity where StageName <> 'closed' limit 10
Select Id, Name, StageName from opportunity where StageName <> '%lose%' limit 10
Select Id, Name, StageName from opportunity where StageName != '%lose%' limit 10
If this answers your question make this as a solution and give KUDOS plz.
for equal you need to check as below
[select id from Account where Name = : NameVariable ]
but in case of value
[select id from Account where Name = 'Sandeep' ]
ans in case of Inequality :
[select id from Account where Name != : NameVariable ]
but in case of value
[select id from Account where Name != 'Sandeep' ]
Hi,
I see you are trying to make a LIKE or NOT LIKE.
LIKE exists in SOQL but NOT LIKE doesn't exists, so you need to use this:
select Name from Account Where NOT fieldname like '%xyz%'