Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 3rd, 2004, 09:41 PM
Registered User
 
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to immanuelsamuel
Default Column width

Hi,

I have imported a table from excel using sqlnet. Now my table columns have 255 length and some column have only 2 character length. Eventhough I am using varcahr2(), I want to create another table and import this data in that. How do I find a column data maximum width, so that I can create another table using that width. Please help me.

Regards
Immanuel

 
Old March 9th, 2004, 12:37 AM
Authorized User
 
Join Date: Aug 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try tu use multiple columns, one way to find the length of a text in oracle is by using this command : select length(fieldname) from tablea;
You can also use the long datatype in oracle.

 
Old March 13th, 2004, 10:30 AM
aas aas is offline
Authorized User
 
Join Date: Mar 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to aas
Default

Quote:
quote:Originally posted by immanuelsamuel
 Hi,

I have imported a table from excel using sqlnet. Now my table columns have 255 length and some column have only 2 character length. Eventhough I am using varcahr2(), I want to create another table and import this data in that. How do I find a column data maximum width, so that I can create another table using that width. Please help me.

Regards
Immanuel
What do you mean under "How do I find a column data maximum"? Do you want concatenate data from more columns of old table? If it true, so
you can calculate maxlength of your data from query:

SELECT max(data_length)
  FROM ( SELECT nvl(length(field1||field2||...||fieldN),0) data_length
           FROM yourTable
       )

Oracle allowing to set of column size till 4000 characters for a text data. If you have maxsize of data more than 4000 you must use the long datatype (as write jlnashrod)






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set Column width harapraveen XSLT 2 October 23rd, 2007 03:14 AM
Max column width in table RickoT HTML Code Clinic 2 November 29th, 2006 08:16 AM
Setting Column Width r_ganesh76 Excel VBA 2 February 2nd, 2005 06:06 AM
DataGrid column width johanyu VS.NET 2002/2003 0 October 30th, 2004 05:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.