This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes need to increase the sizeof this column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "need to increase the sizeof this column " Watch "need to increase the sizeof this column " New topic
Author

need to increase the sizeof this column

deo swaroop
Ranch Hand

Joined: May 21, 2008
Posts: 30
Hi All,

We are using oracle -10G. We have a table CONF and a particular column is defined as VALUE NVARCHAR2(1024) . I need to increase the sizeof this column as it have to handle more data in future.

Please suggest.


Regards,
deo swaroop
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

ALTER TABLE CONF MODIFY VALUE NVARCHAR2(XXXX) doesn't work ?


[My Blog]
All roads lead to JavaRanch
deo swaroop
Ranch Hand

Joined: May 21, 2008
Posts: 30

we are targeting to insert some 1 lakh caracters. nvarchar2 supports only till 2000.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

You could use an NCLOB instead.
deo swaroop
Ranch Hand

Joined: May 21, 2008
Posts: 30
Will we be able to modify even when there is data existing in the table? any other data type?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

deo swaroop wrote:Will we be able to modify even when there is data existing in the table? any other data type?

I think so. Backup your table, and use an "alter table" like the one above.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Mmmh, after some thought, not sure you can. Try it, but if you can't, you can do this instead :
1. Create a new NCLOB column
2. Copy the content of the old column to the new column using UPDATE
3. Drop the old column
4. Rename the new column
deo swaroop
Ranch Hand

Joined: May 21, 2008
Posts: 30
Hi Christophe ,

I really appreciate your help and quick response. Let me iterarte throuth the possible options.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need to increase the sizeof this column
 
Similar Threads
sizeof() in Java?
Determining size of object?
JTable troubles
how can we find the exact size of java Objects like used to find in C++ by sizeof() ?
SizeOf() in java