Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Column length ?
Thu, Nov 5 2009 9:28 AMPermanent Link

Evgen
Hi,  i need column length > 1024, in my project some fields length  >= 6000 , how i can do
it ?
Sorry for my bad english, i'm from Russia Smile
Thu, Nov 5 2009 9:48 AMPermanent Link

Uli Becker
Evgen,

> Hi,  i need column length > 1024, in my project some fields length  >= 6000 , how i can do
> it ?
> Sorry for my bad english, i'm from Russia Smile

Just use a CLOB (Character Large Object) field instead of a VarChar.
Then you can store (nearly) as much as you want.

Uli
Thu, Nov 5 2009 1:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Evgen,

<< Hi,  i need column length > 1024, in my project some fields length  >=
6000 , how i can do it ? >>

Use a CLOB column.   If you need to index a portion of it, you can define a
new GENERATED column defined as a VARCHAR(X) that extracts the desired
portion of the CLOB column for indexing (up to 1024 characters, of course).
You can find out the syntax for defining a GENERATED column here:

http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=10&topic=163

CREATE TABLE MyTable
(
MyLongColumn CLOB,
MyIndexColumn VARCHAR(512) GENERATED ALWAYS AS LEFT(MyLongColumn,512)
)

Also, you can use text indexing to allow for word searches of a CLOB column.
See here for more information:

http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=0&topic=15

<< Sorry for my bad english, i'm from Russia Smile>>

No problem - my Russian is non-existent, so you're doing better than me. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Nov 5 2009 1:15 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


Shouldn't that be a COMPUTED column to save storing the data twice?

Roy Lambert
Sat, Nov 7 2009 11:37 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Shouldn't that be a COMPUTED column to save storing the data twice? >>

The only problem with COMPUTED columns is that they have to be calculated
constantly when rows are retrieved, etc.  Using GENERATED gets around that,
albeit with more storage space consumed.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image