PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Dennis R dot Sherman" <dennis_sherman at unc dot edu>
Subject: (Fwd) Re: Size of null char field
Date: Apr 29 1998 5:15PM

bounced by incorrect forward setup

------- Forwarded Message Follows -------

Sender: Goran.Alterland@scandinaviaonline.se
Message-ID: <35474A04.7724@scandinaviaonline.se>
Date: Wed, 29 Apr 1998 17:40:52 +0200
From: GM Alterland 
X-Mailer: Mozilla 3.01 (X11; I; SunOS 5.5.1 sun4u)
MIME-Version: 1.0
To: SYBPERL-L@trln.lib.unc.edu
Subject: Re: Size of null char field
References: <3.0.1.32.19980429091920.00e23a70@ais-1.uchicago.edu>
Content-Type: text/plain; charset=iso-8859-1
X-MIME-Autoconverted: from 8bit to quoted-printable by
    explorer.scandinaviaonline.se id RAA09652
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by list.cren.net id LAA12378

In a former life we used DB-lib and I distinctly recall
having some parameter that you could set to "drop" those
extra space from the return sets. Novadays the power that
be dictate that use CT-lib only, so we end up doing somthing
like 

$value=~s/^\s+//go;
$value=~s/\s+$//go;

for every single value that we extract (too bothersome
remebering which rows are nulls or not nulls). I'd be
eternally grateful if somebody could tell me of a CT
way to drop those extra spaces before they are even fetched.

> M Brown wrote:
>
> Lee is correct :
> This is an except from Sybooks :
> 
> "Length and Storage Size
> 
> This example illustrates how the column's datatype and null type
> interact to determine how blank spaces are treated:
> 
> +Only char not null and nchar not null columns are padded to the full
> width of the column; char null columns are treated like varchar and
> nchar null columns are treated like nvarchar.

G÷ran Alterland
-- 
G÷ran Alterland
Financial Applications
Scandinavia Online AB

Eschew polysyllabic glossolalia.



--
  Dennis R. Sherman              Triangle Research Libraries Network
  dennis_sherman@unc.edu       Univ. of North Carolina - Chapel Hill
               http://www.unc.edu/~sherman/