How can i use select in SOQL query in Salesforce

0 votes

I am trying to run a select in Salesforce as follows:

     SELECT [Account].* FROM [Account] WHERE [Account].Id IN ('123456789012345678')

but gives an error: "Unknown error parsing query" How can i do this selection ?

Mar 3, 2022 in SalesForce by surbhi
• 3,820 points
2,415 views

1 answer to this question.

0 votes

SOQL is not the same as SQL. In Salesforce, the SQL syntax you're employing is invalid. The Write SOQL Queries unit on Trailhead or the SOQL and SOSL Reference can teach you the basics of SOQL.

There is no support for a SELECT * wildcard in Salesforce until the Spring '21 release. All fields must be fully stated. You'll be able to use FIELDS(ALL) once your organisation has upgraded to Spring '21 (the rollout is still in progress as of this writing). Your question would then be something like this:

SELECT FIELDS(ALL) FROM Account WHERE Id IN ('123456789012345678') 

 you must be using API version 51.0 to connect to Salesforce in order to use this function. You may return up to 200 records.

Elevate your career as a Salesforce Platform Developer with the industry-leading Salesforce Platform Developer1 Certification.

answered Mar 3, 2022 by CoolCoder
• 4,420 points

Related Questions In SalesForce

0 votes
1 answer

parent-child and child-parent relationships in one query SOQL

Yes, it is possible to do so. In ...READ MORE

answered Mar 2, 2022 in SalesForce by surbhi
• 3,820 points
6,091 views
0 votes
1 answer

How can we create salesforce developer account for salesforce essentials?

Developer.salesforce.com is where you can sign up ...READ MORE

answered Mar 3, 2022 in SalesForce by CoolCoder
• 4,420 points

edited Jun 19, 2023 by Khan Sarfaraz 553 views
0 votes
1 answer

How to Update RecordTypeId field in Lightning record form in salesforce?

A critical action that messes everything up ...READ MORE

answered Mar 3, 2022 in SalesForce by CoolCoder
• 4,420 points
3,334 views
0 votes
0 answers

Can i create a sql table populated with Salesforce objects?

does Salesforce offer a way to obtain ...READ MORE

Mar 4, 2022 in SalesForce by surbhi
• 3,820 points
462 views
+2 votes
2 answers

Salesforce Interview questions

Here are some questions very important for ...READ MORE

answered Jan 11, 2019 in Career Counselling by Suresh
• 720 points
3,363 views
0 votes
1 answer

How to connect to salesforce from tableau?

Hi, follow these steps to connect to Salesforce: 1. ...READ MORE

answered Mar 25, 2019 in Tableau by Cherukuri
• 33,030 points
1,027 views
0 votes
1 answer

Power BI - Salesforce

Hi, Follow below steps: 1. Go to Data source. 2. ...READ MORE

answered Mar 25, 2019 in Power BI by Cherukuri
• 33,030 points
726 views
0 votes
2 answers

What is the best training for Salesforce ADM-201 Exam?

Hi @Vardhan, I took Edureka's Salesforce Online Training, ...READ MORE

answered Jun 3, 2021 in Others by Jaya
• 140 points

edited Dec 22, 2021 by Soumya 715 views
0 votes
1 answer

How can I rename my Apex Class name in Salesforce

If you wanted to do it through ...READ MORE

answered Apr 1, 2022 in SalesForce by CoolCoder
• 4,420 points

edited Jun 19, 2023 by Khan Sarfaraz 4,314 views
0 votes
1 answer

How do i get all values from a global pick list in salesforce using REST Api?

Since API 39.0 it is possible to ...READ MORE

answered Mar 17, 2022 in SalesForce by CoolCoder
• 4,420 points
6,987 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP