?
Solved

load data above varchar2(4000) using sqlldr

Posted on 2009-05-04
4
Medium Priority
?
1,247 Views
Last Modified: 2013-12-19
i pull data from sybase using BCP and then build a pipe delimited data file.

I see 2 of the fields are above varchar2(4000).

I need to use sql loader to load the data file to my oracle table.

How to handle the data above 4000 bytes.?


0
Comment
Question by:vishali_vishu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 40

Expert Comment

by:mrjoltcola
ID: 24300492
You should probably use CLOB, there is no "long varchar" as in Sybase, but CLOB works just fine.
0
 
LVL 1

Author Comment

by:vishali_vishu
ID: 24300510
can you please give an example of the ctl file using clob and the create table structure.
0
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 2000 total points
ID: 24300606
CREATE TABLE T (
  ID INTEGER PRIMARY KEY,
  COL1 CLOB
);


Then use the file below. It has inline data, not external file data. To use your data file, you comment out:

infile *

and uncomment:

infile 'dataload.dat'

-- sample sql loader for clob
-- t.ctl
-- run: sqlldr username/password control=t.ctl
 
load data
--infile 'dataload.dat'
infile *
append into table t
fields terminated by '|' optionally enclosed by '"'
(
id      INTEGER EXTERNAL,
col1    CHAR
)
begindata
1|sample data clob ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
2|"sample data clob 2 ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"

Open in new window

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question