Home » SQL & PL/SQL » SQL & PL/SQL » Using VARCHAR2 or CLOB data type
Using VARCHAR2 or CLOB data type [message #9645] Tue, 25 November 2003 22:49 Go to next message
Chris
Messages: 128
Registered: November 1998
Senior Member
I am creating an online meal planner and I am trying to store my recipe description(which is a large blob of text) in an oracle database using SQL*PLUS. I tried using a VARCHAR2 with a limit of 4000 and it cuts off on the string of characters. I also tried using the CLOB datatype but it stored even less characters than the VARCHAR2...

Can you please help...I have been scouring the internet all day for ideas with no luck!
Thanks
Re: Using VARCHAR2 or CLOB data type [message #9646 is a reply to message #9645] Tue, 25 November 2003 23:38 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Here's one solution. Basically it comes down to this: chunk your large text into smaller bits and feed those to the database.

All depends of course of your front end. How are you performing the inserts? Via an SQL script? Through a Java program? Forms perhaps?

MHE
Re: Using VARCHAR2 or CLOB data type [message #9649 is a reply to message #9645] Wed, 26 November 2003 01:28 Go to previous messageGo to next message
Venkat
Messages: 110
Registered: February 2001
Senior Member
Hi,
If your data is full of characters, u can use either varchar or Clob depending on the size. If your data is not characters then use BLOB as datatype.
Varchar can hold upto 4000 characters and Clob can interms of GB's.
I hope it will help u.

Regards
Venkat
Re: Using VARCHAR2 or CLOB data type [message #9652 is a reply to message #9646] Wed, 26 November 2003 14:44 Go to previous messageGo to next message
Chris
Messages: 128
Registered: November 1998
Senior Member
Maher,
I am using sqlldr to insert the data....

How exactly do I chunk the data??
Re: Using VARCHAR2 or CLOB data type [message #9653 is a reply to message #9652] Wed, 26 November 2003 15:18 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Sorry, I don't know much about sqlldr, but perhaps this might help. Search his site for possible other solutions.

MHE
Previous Topic: re: case statement
Next Topic: Help with creating a VIEW
Goto Forum:
  


Current Time: Wed Apr 24 03:21:24 CDT 2024