You need to sign in to do that
Don't have an account?
pokpokpalayok
SOQL field alias
Hi,
Can anyone suggest how to alias field in SOQL? I'm trying to last 4 field coz it's all in type->User
Select a.AccountNumber, a.BillingCity, a.BillingCountry, a.BillingPostalCode, a.BillingState, a.BillingStreet, a.Id, a.Name, Owner.Name as `OName`, CreatedBy.Name as 'CName`, LastModifiedby.Name as `LName` from Account a
If these is not possible, can anyone suggest the best approach.
thanks.
Superfell
SOQL returns a heirarcichal structure for these types of queries, so you don't need any aliasing, as all the owner fields will be within an owner object.