Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

large varchar field

2 posts in Product Futures Discussion Last posting was on 2003-09-17 19:06:46.0Z
Mario Ortiz Posted on 2003-09-17 17:57:47.0Z
From: "Mario Ortiz" <mortiz@ibsoft-us.com>
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: large varchar field
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
X-Original-NNTP-Posting-Host: 66.252.176.38
Message-ID: <3f68a118@forums-2-dub>
X-Original-Trace: 17 Sep 2003 10:59:52 -0700, 66.252.176.38
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 17 Sep 2003 10:54:15 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 17 Sep 2003 10:57:47 -0700
X-Trace: forums-1-dub 1063821467 10.22.108.75 (17 Sep 2003 10:57:47 -0700)
X-Original-Trace: 17 Sep 2003 10:57:47 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1387
Article PK: 95615

Hi

I'm a new member, need some advice:

I am working on a conversion of data from MSSQL to Sybase 12.5 which has
gone fine except for this one table that has a field set for varchar 2000
and holds data in that particular field of around 1543. Here is my question.
With sybase having a limit of 255, how do you import data from this MSSQL
field to the sybase field I set?
Current I setup the table in the sybase database for this particular field
to255.
Any suggestions would be appreciated.
thanks,

Mario
mortiz@ibsoft-us.com


Rob Verschoor Posted on 2003-09-17 19:06:46.0Z
From: "Rob Verschoor" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Newsgroups: sybase.public.ase.product_futures_discussion
References: <3f68a118@forums-2-dub>
Subject: Re: large varchar field
Lines: 63
MIME-Version: 1.0
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: a66246.upc-a.chello.nl
X-Original-NNTP-Posting-Host: a66246.upc-a.chello.nl
Message-ID: <3f68b0c6@forums-1-dub>
Date: 17 Sep 2003 12:06:46 -0700
X-Trace: forums-1-dub 1063825606 62.163.66.246 (17 Sep 2003 12:06:46 -0700)
X-Original-Trace: 17 Sep 2003 12:06:46 -0700, a66246.upc-a.chello.nl
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1388
Article PK: 95617


"Mario Ortiz" <mortiz@ibsoft-us.com> wrote in message
news:3f68a118@forums-2-dub...
> Hi
>
> I'm a new member, need some advice:
>
> I am working on a conversion of data from MSSQL to Sybase 12.5 which
has
> gone fine except for this one table that has a field set for varchar
2000
> and holds data in that particular field of around 1543. Here is my
question.
> With sybase having a limit of 255, how do you import data from this
MSSQL
> field to the sybase field I set?
> Current I setup the table in the sybase database for this particular
field
> to255.
> Any suggestions would be appreciated.
> thanks,
>
> Mario
> mortiz@ibsoft-us.com
>

In ASE 12.5, ASE does not have a limit of 255 characters anymore. The
max. length is now basically limited by the size of the database page.
For a server with 2KB pages, the max. length of a column is around
1960 characters, so your current data could fit in this (for run-time
data, like variables, parameters and run-time character expressions,
the max. length is 16Kb, actually).
Keep in mind though, that this ~1960 chars is also the maximum length
of the entire row. Space taken by other columns must be subtracted
from the maximum length available for other columns. If the other
columns in your table require a few hundred bytes, there may not be
enough space left for your current 1543 characters.
In this case, there are two solutions:
(i) use a server with a larger page size (e.g. 4/8/16 Kb), to increase
the maximum row and column length. Changing the page size requires
migrating the entire server (check out the 'sybmigrate' tool for
this) -- also pay attention to potential locking issues for page lock
schemes.
(ii) split your table vertically, putting the primary key and your
long varchar column in a separate table.

HTH,

Rob
-------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5

Author of "Tips, Tricks & Recipes for Sybase ASE" and
"The Complete Sybase ASE Quick Reference Guide"
Online orders accepted at http://www.sypron.nl/shop

mailto:rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------