You need to sign in to do that
Don't have an account?
Nandika Kodituwakku 10
how to Alias a column in SOQL
Hi Devs,
How do we something simple like below in SOQL.
SELECT ID as ROW_NATURAL_ID FROM ACCOUNT;
Regards,
Nandika
How do we something simple like below in SOQL.
SELECT ID as ROW_NATURAL_ID FROM ACCOUNT;
Regards,
Nandika
you can't create alisa on field, in salesforce it is allow only with the aggregate function. like below
In above it will create default alias expr0 to total.
Thanks, Vikas
The one exception is for queries that use aggregations, like SELECT COUNT(Id) recordCount FROM Account allows you to alias the result of the aggregation from it's default expr0 to recordCount.
So we have to change all our code downstream whenever we make a change to underlying data structure?
The best way is using Format(Field) Custom_Name. It could be tricky way to use this with some dates values or e.t.c cause function changes format of values in field.
Hi SF people,
came acorss this topoic. I think SF is not implementing this on purpose, so that you know what you get from the query. And to try to tell you that when sending data to the FE it is always a good idea to use a wrapper obejct and there you can name things as you wish. So think of this as a way to keep integrity and push you to the good developing practices.
Alias notation in SOQL statements are used to distinguish different object used in a single SOQL Statement. To establish the alias, first we should identify the object and then specify the alias. In Salesforce SOQL, we have some reserved keywords which are not used as alias names.
Retrol Bowl (https://retrobowl-game.com/)
http://narwhaleio.us
Pointing your fingers is a very rude thing to do, especially when you don’t know a person.
https://snakeio.info
Evolution is funny thing actually, sometimes it makes hilarious mistakes and we have weird species of animals.
https://mahjongtitans.us