The second column for SQL Server and Oracle datatypes shows what the data type is converted to. I’m currently working on a solution to set theĀ conversion information in a config file.
SQL Server Data Types
SQL Server type | ACopy type | Comment |
varchar | Varchar / LongText | If length is -1 (max), then LongText |
char | Char | |
nvarchar | String / LongText | If length is -1 (max), then LongText |
bit | Bool | |
tinyint | Int8 | |
smallint | Int16 | |
int | Int | |
bigint | Int64 | |
decimal | Float / Money | If prec = 28 and scale = 3, then Money |
datetime | DateTime | |
datetime2 | DateTime | |
uniqueidentifier | Guid | |
varbinary(-1) | Raw | OBS: Other lengths for varbinary is not supported. |
Oracle Data Types
Oracle data type | ACopy data type | Comment |
varchar | Varchar | |
varchar2 | Varchar | |
char | Varchar | |
clob | LongText | |
integer | Int | |
number (1,0) | Bool | |
number(3,5) | Int8 | |
number(5,0) | Int16 | |
number(20,0) | Int64 | |
number(x,0) | Int | x not in (1, 3, 5, 20) |
number(18,2) | Money | |
number(30,3) | Money | |
number(x,y) | Float | y!=0 and !(x=18 and y=2) and !(x=30 and y=3) |
float | Float | |
date | DateTime | |
raw(x) | Guid | x in (16, 32, 17, 34)
OBS: No other raw is currently supported |
blob | Raw | |
long raw | Raw | |
ACopy Data Types
ACopy data type | Description |
Varchar | |
Char | |
String | |
LongText | Equivalent to clob and varchar(max) for Oracle and SQL Server. |
Bool | |
Int8 | |
Int16 | |
Int | |
Int64 | |
Money | Numbers are rounded to 2 or 3 decimals. |
Float | A number with high precision and scale. E.g. decimal(28,8). |
DateTime | |
Guid | |
Raw | Blob (byte array) |
Identity | Currently only used to handle identity columns in SQL Server. |