public java.lang.String getDataType(
java.lang.String pDataTypeName,
java.lang.String pDataTypeLength,
java.lang.String pDataTypePrecision)
Returns the creation syntax of the following SQL data types: varchar, numeric or date according to the parameters associated to the source or target technology.
Parameter |
Type |
Description |
---|---|---|
pDataTypeName |
String |
Name of the data type as listed in the table below |
pDataTypeLength |
String |
Length of the data type |
pDataTypePrecision |
String |
Precision of the data type |
The following table lists all possible values for pDataTypeName
Value |
Description |
---|---|
SRC_VARCHAR |
Returns the syntax to the source data type varchar |
SRC_NUMERIC |
Returns the syntax to the source data type numeric |
SRC_DATE |
Returns the syntax to the source data type date |
DEST_VARCHAR |
Returns the syntax to the target data type varchar |
DEST_NUMERIC |
Returns the syntax to the target data type numeric |
DEST_DATE |
Returns the syntax to the target data type date |
Given the following syntax for these technologies:
Technology |
Varchar |
Numeric |
Date |
---|---|---|---|
Oracle |
varchar2(%L) |
number(%L,%P) |
date |
MS SqlServer |
varchar(%L) |
numeric(%L,%P) |
datetime |
MS Access |
Text(%L) |
double |
datetime |
Here are some examples of call to getDataType:
Call |
Oracle |
MS SqlServer |
MS Access |
---|---|---|---|
<%=odiRef.getDataType("DEST_VARCHAR", "10", "")%> |
varchar2(10) |
varchar(10) |
Text(10) |
<%=odiRef.getDataType("DEST_VARCHAR", "10", "5")%> |
varchar2(10) |
varchar(10) |
Text(10) |
<%=odiRef.getDataType("DEST_NUMERIC", "10", "")%> |
number(10) |
numeric(10) |
double |
<%=odiRef.getDataType("DEST_NUMERIC", "10", "2")%> |
number(10,2) |
numeric(10,2) |
double |
<%=odiRef.getDataType("DEST_NUMERIC", "", "")%> |
number |
numeric |
double |
<%=odiRef.getDataType("DEST_DATE", "", "")%> |
date |
datetime |
datetime |
<%=odiRef.getDataType("DEST_DATE", "10", "2")%> |
date |
datetime |
datetime |