On Tue 22 Jan 2002 00:16, "Jeff Urlwin" <[EMAIL PROTECTED]> wrote:
> Tim,
>
> I'm against it. Reasoning: char (and nchar) columns are, at least in my
> experience, PADDED by the DB. Varchar columns, typically, are not. Thus:
> insert into char colum 'A' yeilds 'A ' when selected (of course,
> depending upon the size of the column) whereas
> insert into varchar column 'A' yields 'A' when selected.
>
> It seems to me that trimming char columns is important so that you get out
> what you put in (most of the time). It seems that trimming varchar columns
> means you don't get out what you put in. I do believe we should attempt to
But this is *exacvtly* why I asked in the first place:
insert into varchar column '' yields NULL when selected (in Oracle)
Which is **NOT** what I put in!
> get out what you put in, not make decisions for the programmer(s). It's
> simple enough to pick the columns you want trimmed and s/s+$//; In my
> experience, I almost always trim CHAR columns and almost never trim varchar
> columns, based upon what I put into them and what I expect out...
>
> Of course, that's my opinion and subject to those with broader experience.
>
> Jeff
--
H.Merijn Brand Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 630 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/