RE: Using TRIM

2000-08-14 Thread stas

Could it be because the fields in the database are set to CHAR and not to
VARCHAR?


-Original Message-
From: Planet CF [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 14, 2000 10:38 AM
To: [EMAIL PROTECTED]
Subject: Using TRIM


Hi All,
A 'Select' on a Sybase Database results in extra
spaces being added to the data being selected (mostly
spaces on the right). I really don't know as to why
this is happenning.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Using TRIM

2000-08-14 Thread Peter Theobald


A field of type char(30) will return a 30 character long
string padded with spaces on the right.
Use varchar instead.


At 07:37 AM 8/14/00 -0700, Planet CF wrote:
Hi All,
A 'Select' on a Sybase Database results in extra
spaces being added to the data being selected (mostly
spaces on the right). I really don't know as to why
this is happenning.

So what we do is use the TRIM function to get rid of
those spaces. Now this has become some kind of a
"xtra" in the application. Like... if somehow you
forget to TRIM, you end up in errors which are not
traceable to a specific code for a long time
kindof time consuming... and frustratiing too. 

There could be two solutions to this problem:
1. Find out the reason for the 'spaces' that are being
added and fix the problem at the root.

2. Assuming that the problem cannot be fixed and one
has to deal with TRIM, a better way of doing it (that
comes to my mind) would be to write a custom tag that
TRIM's all query data before sending it to the calling
page. Is there a custom tag on the gallery, that
already does this?

Any suggestions or comments are welcome.

Thanks
Kedar Desai
Differential Technologies
Fairfax, VA


__
Do You Yahoo!?
Yahoo! Mail ­ Free email you can access from anywhere!
http://mail.yahoo.com/" eudora="autourl">http://mail.yahoo.com/
--
Archives:
http://www.mail-archive.com/cf-talk@houseoffusion.com/" 
eudora="autourl">http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk" 
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. 



---
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com/" 
eudora="autourl">http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.