You need to sign in to do that
Don't have an account?
pla
SOQL does not contain statement
Hello,
How can I write a SOQL statement with a clause "does not contain" ? I've tried this Carrier_ID__c not like '%TEST%' but it does not work. I want to use this SOQL for the dataloader to export the data. Please advise.
Thanks
Paul
Hi,
I created one formula field salesforceID__c in account object and added the below code
CASESAFEID(Id)
in formula and when ever u create a account record this filed salesforceID store 18 digits salesforce record id.By this u can retrieve 18 digits ID in reports.
Regards,
Rajesh.
All Answers
The correct syntax is
I just tried NOT (Carrier_ID__c like '%TEST%' ) and it's still not working. I still got the error.
Please help.
thanks
I just tried
And it worked as expected
I've tried it again and it does not work for me. I think it works a little different for dataloader tool. This sql is for dataloader tool to export data. Any idea will make it work?
Thanks,
Paul
HI,
Avidev9 is correct.You need to write :
Select Id, Name FROM Account where not( name like '%CS%' ).
It gives the correct result.
Hi,
As above mentioned is correct, but u still u not getting means then try to generate report and in this we have "does not contains" filter and retrieve the required result.
Regards,
Rajesh.
The report generates only 15 digit ID and that's the reason why I use the dataloader to generate the report as it will give me the 18 digit ID.
Thanks
Hi,
Create one custom formula for object which u want 18 digits in report and paste the below code in it and save.
Can you show me an example of how you do it? let's use Account object for the report that I want for 18 digit ID.
Thanks
Paul
Hi,
I created one formula field salesforceID__c in account object and added the below code
CASESAFEID(Id)
in formula and when ever u create a account record this filed salesforceID store 18 digits salesforce record id.By this u can retrieve 18 digits ID in reports.
Regards,
Rajesh.
Thanks. An 18 digit account ID is what I need for the report.
Paul
Hi,
In report u can use that custom field SalesforceID which we will retrive 18 digits of ur record Id.
Please try once again.
Regards,
Rajesh.
Thanks Rajesh. It works for me now. That's what I meant in my previous message.
Paul
"NOT (Carrier_ID__c like '%TEST%' )" does not work.
Beto Carvalho 11
The operator NOT has to be inside the parenthesis (NOT Carrier_ID__c like '%TEST%' ). Just tried this syntax and it works.
"NOT (Carrier_ID__c like '%TEST%' )" does not work.
The operator NOT has to be inside the parenthesis (NOT Carrier_ID__c like '%TEST%' ). Just tried this syntax and it works.
"NOT (Carrier_ID__c like '%TEST%' )" does not work.
eg
WHERE
Some_Field__c !=''
AND (NOT(Account.Name LIKE '%Test%'))