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
Gauri Gaikwad 13Gauri Gaikwad 13 

SOQL Query basic

I am trying to run SOQL query 

code added in query editor
SELECT
            First_Name__c
            Experience__c

FROM
            Indeed_COm_Job_Form__c

WHERE 
            Experience__c >1

and i am getting error as : Invalid query: The query has to start with 'FIND' or 'SELECT'.
but i have used SELECT word at beginning
 
Best Answer chosen by Gauri Gaikwad 13
Mani KandulaMani Kandula
Hello Gauri,

Please check this

SELECT First_Name__c,Experience__c FROM Indeed_COm_Job_Form__c  WHERE Experience__c >1
Make sure API names are correct,

Once try to check the code in Workbench, 
 

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi Gauri,

Can you check if there is any space before select statement.There is no comma after First field as well.
 
SELECT First_Name__c,Experience__c FROM Indeed_COm_Job_Form__c WHERE Experience__c >1

Can you try exeuting the above query and I hope the API name of object and fields were correct.

If this solution helps, Please mark it as best answer.

Thanks,
​​​​​​​
Shams TabrezShams Tabrez
Hi Gauri,

Please use at least one field after the SELECT statement. Also, a comma is missing after a field First_Name__c.

SELECT First_Name__c,Experience__c FROM Indeed_COm_Job_Form__c WHERE Experience__c >1
(or)

SELECT First_Name__c,
            Experience__c

FROM
            Indeed_COm_Job_Form__c

WHERE 
            Experience__c >1

Thanks,
Tabrez
Mani KandulaMani Kandula
Hello Gauri,

Please check this

SELECT First_Name__c,Experience__c FROM Indeed_COm_Job_Form__c  WHERE Experience__c >1
Make sure API names are correct,

Once try to check the code in Workbench, 
 
This was selected as the best answer