{"id":2383,"date":"2011-05-16T17:12:35","date_gmt":"2011-05-16T12:12:35","guid":{"rendered":"http:\/\/www.chiragmehta.info\/chirag\/?p=2383"},"modified":"2011-05-16T18:11:47","modified_gmt":"2011-05-16T13:11:47","slug":"field-datatype-mapping-between-oraclesql-server-and-salesforce","status":"publish","type":"post","link":"https:\/\/www.chiragmehta.info\/chirag\/2011\/05\/16\/field-datatype-mapping-between-oraclesql-server-and-salesforce\/","title":{"rendered":"Field datatype mapping between Oracle\/SQL Server and Salesforce"},"content":{"rendered":"<p>Over the time I have started developing a tool that pulls salesforce metadata information and creates oracle\/sql server &#8220;create table&#8221; scripts. Isn&#8217;t that really awesome!!<\/p>\n<p>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 &#8211; enjoy!!<\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"568\" height=\"453\">\n<colgroup>\n<col width=\"133\"><\/col>\n<col span=\"2\" width=\"161\"><\/col>\n<\/colgroup>\n<tbody>\n<tr height=\"20\">\n<td width=\"133\" height=\"20\"><strong>salesforce   data type<\/strong><\/td>\n<td width=\"161\"><strong>sql server data   type<\/strong><\/td>\n<td width=\"161\"><strong>oracle data   type<\/strong><\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">boolean<\/td>\n<td>bit<\/td>\n<td>varchar2(1)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">date<\/td>\n<td>smalldatetime<\/td>\n<td>date<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">datetime<\/td>\n<td>Datetime<\/td>\n<td>date<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">currency<\/td>\n<td>decimal(precision,scale)<\/td>\n<td>number(precision,scale)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">double<\/td>\n<td>decimal(precision,scale)<\/td>\n<td>number(precision,scale)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">int<\/td>\n<td>Int<\/td>\n<td>number(10)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">picklist<\/td>\n<td>nvarchar(255)<\/td>\n<td>varchar2(255)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">id<\/td>\n<td>nvarchar(18)<\/td>\n<td>varchar2(18)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">reference<\/td>\n<td>nvarchar(18)<\/td>\n<td>varchar2(18)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">textarea<\/td>\n<td>nvarchar(max)<\/td>\n<td>varchar2(4000)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">email<\/td>\n<td>nvarchar(255)<\/td>\n<td>varchar2(255)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">phone<\/td>\n<td>nvarchar(255)<\/td>\n<td>varchar2(255)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">url<\/td>\n<td>nvarchar(255)<\/td>\n<td>varchar2(255)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">textarea<\/td>\n<td>nvarchar(max)<\/td>\n<td>varchar2(4000)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">multipicklist<\/td>\n<td>nvarchar(max)<\/td>\n<td>varchar2(4000)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">anyType<\/td>\n<td>nvarchar(max)<\/td>\n<td>varchar2(4000)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">percent<\/td>\n<td>decimal(5,2)<\/td>\n<td>number(5,2)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">combobox<\/td>\n<td>nvarchar(max)<\/td>\n<td>varchar2(4000)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">base64<\/td>\n<td>nvarchar(max)<\/td>\n<td>varchar2(4000)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">time<\/td>\n<td>nvarchar(255)<\/td>\n<td>varchar2(255)<\/td>\n<\/tr>\n<tr height=\"20\">\n<td height=\"20\">string<\/td>\n<td>nvarchar(length)<\/td>\n<td>varchar2(length)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the time I have started developing a tool that pulls salesforce metadata information and creates oracle\/sql server &#8220;create table&#8221; scripts. Isn&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[119,117,118,116,114,169,115],"class_list":["post-2383","post","type-post","status-publish","format-standard","hentry","category-salesforce","tag-create-table","tag-data-type","tag-field-mapping","tag-microsoft-2","tag-oracle-2","tag-salesforce","tag-sql-server","post-preview"],"_links":{"self":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/2383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/comments?post=2383"}],"version-history":[{"count":7,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/2383\/revisions"}],"predecessor-version":[{"id":2388,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/posts\/2383\/revisions\/2388"}],"wp:attachment":[{"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/media?parent=2383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/categories?post=2383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chiragmehta.info\/chirag\/wp-json\/wp\/v2\/tags?post=2383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}