function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
devloper sfdcdevloper sfdc 

Problem in Soql store in string variable

Hi All ,
it is showing Error missing ';' semicolon on every value.

String query = 'SELECT Id,FROM InContactData__C WHERE skill_name__c IN('DMU SDChat1';'DeSales_PhoneIn_AfterHours','DeSales_PhoneIn_BusinessHours','OurtageAlert','BigDeals','CH-Priority Line_PhoneIn','CH-Priority Line_PhoneIn'    ,'LMS_PhoneIn','LMSxfer_PhoneIn','AI ChatBOT Transfer','CIOApp_PhoneIn','BBH Sales_PhoneIn','EMER_PhoneIn','USPW_PhoneIn', 'LIM CollegeLMS(Fac)-PhoneIn','LipscombFA-PhoneIn','LipscombBO-PhoneIn','BridgewaterTTC_PhoneIn','CaliforniaCC-Chat','MoraineParkTC(ClsrEmr)-PhoneIn',    'Curry Emergency_PhoneIn','BridgewaterResNet_PhoneIn','LIM CollegeLMS(Stu)-PhoneIn','DMU LMS','MiddlesexCC-ClassroomEmergency', 'LipscombIT Emergency_PhoneIn','SouthDakota(Fac)-PhoneOut','Laboure_PhoneIn','LeMoyne-Owen College')';
Best Answer chosen by devloper sfdc
devloper sfdcdevloper sfdc
Thanks Arun its working 

All Answers

Arunkumar RArunkumar R
Hi,

You have to append string as below,
 
String query = 'SELECT Id,FROM InContactData__C WHERE skill_name__c IN(\'DMU SDChat1\',\'DeSales_PhoneIn_AfterHours\',\'DeSales_PhoneIn_BusinessHours\',\'OurtageAlert\',\'BigDeals\',\'CH-Priority Line_PhoneIn\',\'CH-Priority Line_PhoneIn\',\'LMS_PhoneIn\',\'LMSxfer_PhoneIn\',\'AI ChatBOT Transfer\',\'CIOApp_PhoneIn\',\'BBH Sales_PhoneIn\',\'EMER_PhoneIn\',\'USPW_PhoneIn\', \'LIM CollegeLMS(Fac)-PhoneIn\',\'LipscombFA-PhoneIn\',\'LipscombBO-PhoneIn\',\'BridgewaterTTC_PhoneIn\',\'CaliforniaCC-Chat\',\'MoraineParkTC(ClsrEmr)-PhoneIn\',\'Curry Emergency_PhoneIn\',\'BridgewaterResNet_PhoneIn\',\'LIM CollegeLMS(Stu)-PhoneIn\',\'DMU LMS\',\'MiddlesexCC-ClassroomEmergency\', \'LipscombIT Emergency_PhoneIn\',\'SouthDakota(Fac)-PhoneOut\',\'Laboure_PhoneIn\',\'LeMoyne-Owen College\')';

 
devloper sfdcdevloper sfdc
Thanks Arun its working 
This was selected as the best answer
Arunkumar RArunkumar R
Hi, 
Please select the answer as a best instead of your comment. This will helps others also.