Ask a Question related to Informix, Design and Development.
-
Dirk Moolman #1
VARCHAR or not ?
Solaris 8
IDS 7.31 FD3
We have to create a table, that will contain a code, a short description and then a long description (up to 2000 characters).
This is basically a lookup table, and will be used for browsing, verifying and selecting codes.
Varchar has a limit of 255 characters. Does this mean I have to define a char(2000) column for the long description ?
Any suggestions ?
Regards
Dirk
sending to informix-list
Dirk Moolman Guest
-
varchar vs text
Are there any differences between text and varchar? I found the following in the docs, which leads me to believe that there are no differences at... -
converting varchar to double
Hi, I try to cast/convert a varchar into a double but it doesn't work, i get an error that it isn't possible to convert. What can I do? The... -
text and varchar
Hello, sorry for the trivial question. Is there any difference between varchar and text types in practice? I couldn't find. Mage ... -
Question about varchar and text
What is the difference between varchar and text? I have heard that you can use text instead of varchar and this could speed up your tables. ... -
varchar truncated at 255 characters
i have a SP that builds a t-sql script. I use a varchar variable to build the script. I have declared the variable as varchar(8000). When I run... -
Gorazd Hribar Rajterič #2
Re: VARCHAR or not ?
....
char(2000) column for the long description ?> Varchar has a limit of 255 characters. Does this mean I have to define a
Basically - YES. You could also use TEXT field, but I wouldn't recommend it.
Split your description into multiple lines which can then be of VARCHAR> Any suggestions ?
type.
Gorazd
Gorazd Hribar Rajterič Guest
-
Obnoxio The Clown #3
Re: VARCHAR or not ?
Dirk Moolman wrote:
Upgrade to 9.30 or 9.40 -- use the LVARCHAR data type, which can now be (I> Solaris 8
> IDS 7.31 FD3
>
>
> We have to create a table, that will contain a code, a short description
> and then a long description (up to 2000 characters). This is basically a
> lookup table, and will be used for browsing, verifying and selecting
> codes.
>
> Varchar has a limit of 255 characters. Does this mean I have to define a
> char(2000) column for the long description ?
>
> Any suggestions ?
think) up to 32K. Definitely 2K.
Obnoxio The Clown Guest
-
Art S. Kagel #4
Re: VARCHAR or not ?
On Tue, 09 Sep 2003 06:07:50 -0400, Dirk Moolman wrote:
Split the description in to a subsidiary table containing just the key, a
sequence number, and a small CHAR or VARCHAR (say 80 or 100 bytes per record).
If the natural key of the parent table is too long add a SERIAL column in the
parent table and use that as the key to the child table along with the sequence
number. Then you can have as many or as few detail lines as needed with
minimal waste.
Art S. Kagel
> Solaris 8
> IDS 7.31 FD3
>
>
> We have to create a table, that will contain a code, a short description and
> then a long description (up to 2000 characters). This is basically a lookup
> table, and will be used for browsing, verifying and selecting codes.
>
> Varchar has a limit of 255 characters. Does this mean I have to define a
> char(2000) column for the long description ?
>
> Any suggestions ?
>
>
> Regards
> Dirk
>
>
>
> sending to informix-listArt S. Kagel Guest



Reply With Quote

