aspose file tools
The moose likes Oracle/OAS and the fly likes need to increase the sizeof this column Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Reply 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
Greenhorn

Joined: May 21, 2008
Posts: 28
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: 14670
    
  11

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


[My Blog]
All roads lead to JavaRanch
deo swaroop
Greenhorn

Joined: May 21, 2008
Posts: 28

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

Joined: Nov 24, 2005
Posts: 14670
    
  11

You could use an NCLOB instead.
deo swaroop
Greenhorn

Joined: May 21, 2008
Posts: 28
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: 14670
    
  11

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: 14670
    
  11

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
Greenhorn

Joined: May 21, 2008
Posts: 28
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?
how can we find the exact size of java Objects like used to find in C++ by sizeof() ?
SizeOf() in java
JTable troubles
Determining size of object?