Skip to Content
avatar image
Former Member

is it SUBSTR ?

1) Changing a column from Sql Server to Oracle using the below mapping rule

varchar(5) -> 2 char cut off ->VARCHAR2 (5 BYTE)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 19, 2017 at 09:41 AM

    Hi Navya,

    Just create target table in oracle with required column data types and load the data.

    Cut off after 5 characters --- You can use SUBSTR() function to cut a string.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 20, 2017 at 09:48 AM

    Hi navya sinha,

    while creating target table, you can specify that column to default null like below and you can also pass NULL in the query transform mapping for this column.

    CREATE TABLE Persons (
    ID int NOT NULL,
    LastName varchar(255) NOT NULL,
    FirstName varchar(255),
    Age int DEFAULT NULL,
    City varchar(255) DEFAULT 'Sandnes'
    );

    Add comment
    10|10000 characters needed characters exceeded