Database Utilities (MOSC)

MOSC Banner

How to load VARGRAPHIC datatype using SQL Loader

edited Mar 2, 2016 11:15AM in Database Utilities (MOSC) 4 commentsAnswered

Hello All,

I have a set of unloaded data from DB2 in a datafile which contains one of the column as 'VARG' (which corresponds to VARGRAPHIC in Oracle).

I am trying to load this data from the datafile using SQL Loader into a table whose structure is as shown below:

Name                                      Null?    Type

----------------------------------------- -------- ----------------------------

COL1                                               NVARCHAR2(255)

My control file used to load the data looks like this:

LOAD DATA CHARACTERSET WE8EBCDIC37  byteorder big

INFILE 'DATAFILE.DAT' "FIX 1180"

truncate 

into table VARG_TEST

  COL1  POSITION ( 1:512 ) VARGRAPHIC(255) NULLIF  (513) = '?'

)

*I have calculated the position of the datafile in this manner: [2*(Length of the Field) + 2]

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center