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
BKBK 

soql syntax

Hey guys,

how do you rename a field name header with soql? what is the syntax? i can't seem to find it in the api doc.

example in sql would be

select mailingstreet as [street] from contact;

thanks guys

SuperfellSuperfell
You can't do that in SOQL
BKBK

how can i write this in vb? i am changing all the mailing address fields to other and other address fields to mailing. jsut a switch

SuperfellSuperfell
Select all the rows you want to change, switch over the fields (t = x.City, x.City = x.OtherCity, x.OtherCity = t etc) and call update. You'll want to batch up the calls to update, and pass 100 or so at a time to the update call.
DevAngelDevAngel

Hi BK,

The new Managed Data Provider for .Net (on source forge right now) allows you to do table mappings which is essentially renameing the columns at data load.