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 type | sql server data type | oracle data type |
| boolean | bit | varchar2(1) |
| date | smalldatetime | date |
| datetime | Datetime | date |
| currency | decimal(precision,scale) | number(precision,scale) |
| double | decimal(precision,scale) | number(precision,scale) |
| int | Int | number(10) |
| picklist | nvarchar(255) | varchar2(255) |
| id | nvarchar(18) | varchar2(18) |
| reference | nvarchar(18) | varchar2(18) |
| textarea | nvarchar(max) | varchar2(4000) |
| nvarchar(255) | varchar2(255) | |
| phone | nvarchar(255) | varchar2(255) |
| url | nvarchar(255) | varchar2(255) |
| textarea | nvarchar(max) | varchar2(4000) |
| multipicklist | nvarchar(max) | varchar2(4000) |
| anyType | nvarchar(max) | varchar2(4000) |
| percent | decimal(5,2) | number(5,2) |
| combobox | nvarchar(max) | varchar2(4000) |
| base64 | nvarchar(max) | varchar2(4000) |
| time | nvarchar(255) | varchar2(255) |
| string | nvarchar(length) | varchar2(length) |
DBA’s this is for u ….
🙂
Hi Chirag,
This is great. Just curious – would you have a similar list for SYBASE? Thank you.
Regards,
Shakeel
Would you be willing to share the code that generates the CREATE TABLE scripts?
@Shakeel – Sorry for late reply, dont have one for SYBASE. It should be fairly easy to compile.
@Nathan – Sorry buddy I don’t have one. Also I had developed it for my previous company, so all code is in their repository with no access 🙁
Hi Chirag,
Is it possible to use Salesforce only as a console and the backend as Oracle/Sql Server (No data.com)?
Ananth.R.