You need to sign in to do that
Don't have an account?
Heather Florio
Selecting from order table, trying to sort results
Hello. I'm working on the API and am trying to query the table named "Order" and also sort the results. I get an error because the word order is a reserved word in SQL. How do I work around this? I've tried brackets and backticks around the table name, but neither of those worked.
SELECT OrderNumber FROM Order limit 5 order by OrderNumber
How do I use the reserved word "order" as the table name?
Thank you!
SELECT OrderNumber FROM Order limit 5 order by OrderNumber
How do I use the reserved word "order" as the table name?
Thank you!
Order is the Custom Object Right. So, You should you Order__c. We should not use reserved key word as table name or variable name like anything.
Regards,
Navin S
Kindly let me know if my helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Regards,
Navin
I'm fairly certain this is the standard Order object built-in to Salesforce, so that's probably not going to work.
When I use the REST Explorer, it says the API name of the object is "Order". In other languages I use [ ] or backticks to get around this. Is there a similar thing in SalesForce?
But, in SF we can able to execute the query as below:
Need to check in rest explorer if we need to query from there. But i am also little new to SF, I havent used api's . Regarding from API's, I dont have any idea. If i found anything, i will keep you posted.