Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 15 total
Thread Trailing spaces
Wed, Mar 5 2008 1:05 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

I'm not being disputatious but every time I try to figure it out by brain goes TILT.

What is the rationale behind storing trailing spaces but not using them in comparisons?

I can only come up with one theory, and if one of my staff when I ran an IT Department had come up with it I would had set him/her to training the director's secretary in using a word processor for 6 months. If that didn't work I had a really great penance but I'm not going to mention it in polite company Smiley

The theory:

Its in case you want to catenate the column with another one and have a space separating them.

I can, with the null problem see a valid reason for storing a single space Smiley but smoke comes out of my ears when I try to figure out comparing - is it a trailing space or not? If so what is it trailing?

Roy Lambert
Thu, Mar 6 2008 5:09 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< What is the rationale behind storing trailing spaces but not using them
in comparisons? >>

Are you talking about CHARs, VARCHARs, or both ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Mar 7 2008 3:52 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


I suppose its VARCHARs really cos I understand CHARs are right padded and if you're going to pad them it makes sense to ignore the trailing spaces in compares, and since they're fixed length you'd have to pad on display/printing.

Roy Lambert
Fri, Mar 7 2008 10:39 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I suppose its VARCHARs really cos I understand CHARs are right padded and
if you're going to pad them it makes sense to ignore the trailing spaces in
compares, and since they're fixed length you'd have to pad on
display/printing. >>

Well, the idea with VARCHARs is just like any other column - we don't
arbitrarily modify the data when it is input.  What is input, is what is
stored, period.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Mar 7 2008 11:21 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

>Well, the idea with VARCHARs is just like any other column - we don't
>arbitrarily modify the data when it is input. What is input, is what is
>stored, period.

I thought in an earlier post you said it was part of the standard, so if not maybe you can be prevailed on......

Not to bothered though since I've already altered my edit component to trim things for me. Seemed easier than loads of triggers.

Roy Lambert
Mon, Mar 10 2008 3:53 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I thought in an earlier post you said it was part of the standard, so if
not maybe you can be prevailed on...... >>

Yes, it's part of the standard also.  I was simply explaining the rationale
behind it.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Mar 11 2008 3:42 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


This is why my brain falls over

"What is input, is what is stored, period."

Now we're going to ignore some of what is stored when we do a comparison so we didn't really believe you meant it.

As Spock would say - it does not compute Smiley

Roy Lambert
Tue, Mar 11 2008 3:57 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

ps


As I said at the beginning I'm not trying to be awkward I'd just like to know and understand the thinking behind it. If you don't know either fair enough.

Roy Lambert
Tue, Mar 11 2008 8:48 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


Just realised my ps could be read as a dig at you - it isn't.

Roy Lambert
Tue, Mar 11 2008 4:55 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Now we're going to ignore some of what is stored when we do a comparison
so we didn't really believe you meant it. >>

Only for searching purposes.  This doesn't include display, etc.

--
Tim Young
Elevate Software
www.elevatesoft.com

Page 1 of 2Next Page »
Jump to Page:  1 2
Image