Monday, September 26, 2011

Field datatype mapping between Oracle/SQL Server and Salesforce

Over the time I have started developing a tool that pulls salesforce metadata information and creates oracle/sql server “create table” scripts. Isn’t that really awesome!!
The most useful part of the tool is field data type mapping i.e, what data type of salesforce maps to what data type of oracle/sql server. Below is the list of mapping that I used while generating create table scripts – enjoy!!

salesforce data typesql server data typeoracle data type
booleanbitvarchar2(1)
datesmalldatetimedate
datetimeDatetimedate
currencydecimal(precision,scale)number(precision,scale)
doubledecimal(precision,scale)number(precision,scale)
intIntnumber(10)
picklistnvarchar(255)varchar2(255)
idnvarchar(18)varchar2(18)
referencenvarchar(18)varchar2(18)
textareanvarchar(max)varchar2(4000)
emailnvarchar(255)varchar2(255)
phonenvarchar(255)varchar2(255)
urlnvarchar(255)varchar2(255)
textareanvarchar(max)varchar2(4000)
multipicklistnvarchar(max)varchar2(4000)
anyTypenvarchar(max)varchar2(4000)
percentdecimal(5,2)number(5,2)
comboboxnvarchar(max)varchar2(4000)
base64nvarchar(max)varchar2(4000)
timenvarchar(255)varchar2(255)
stringnvarchar(length)varchar2(length)

2 comments:

  1. Nice and good article.. it is very useful for me to learn and understand easily.. thanks for sharing your valuable information and time.. please keep updating.morephp jobs in hyderabad.
     

    ReplyDelete
  2. • I very much enjoyed this article. Nice article thanks for given this information. I hope it useful to many People DATA SINCE Online Training

    ReplyDelete