dbTalk Databases Forums  

What is SQL datalength(rtrim...?

comp.databases.sybase comp.databases.sybase


Discuss What is SQL datalength(rtrim...? in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave Rupp
 
Posts: n/a

Default What is SQL datalength(rtrim...? - 02-17-2004 , 03:34 PM






What does datalength(rtrim...) do? I can guess the datalength, but
what is rtrim? I am running ASA 7.0.

TIA,
Dave...

Reply With Quote
  #2  
Old   
Michael Peppler
 
Posts: n/a

Default Re: What is SQL datalength(rtrim...? - 02-17-2004 , 04:23 PM






On Tue, 17 Feb 2004 13:34:32 -0800, Dave Rupp wrote:

Quote:
What does datalength(rtrim...) do? I can guess the datalength, but
what is rtrim? I am running ASA 7.0.
rtrim() is "right trim" - remove spaces from the right of the string.

Michael
--
Michael Peppler Data Migrations, Inc.
mpeppler (AT) peppler (DOT) org http://www.peppler.org/
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.peppler.org/resume.html



Reply With Quote
  #3  
Old   
Ram DSL
 
Posts: n/a

Default Re: What is SQL datalength(rtrim...? - 02-18-2004 , 04:52 AM



Dave,

Trim is for removing the extra spaces in the data.
rtrim is for removing space in the right side of the data, and ltrim
for left side.
take the example:
' Dave ' <---- length is 6
rtrim(' Dave ') <-----Now triming spaces in the right side so the
length is 5.
ltrim(' Dave ') <-----Now triming spaces in the left side so the
length is 5.
ltrim(rtrim(' Dave ')<----trimging spaces in both sides so the length
is 4.

Use depends upon the situation.

select length = datalength(' Dave ') ,
rtrimoflenghth = datalength(rtrim(' Dave ')),
ltrimoflength = datalength(ltrim(' Dave ')) ,
alltrimoflength = datalength(rtrim(ltrim(' Dave ')))
__________________________________________________ ____

Regards,
Ram DSL, London.
www.dslsoft.net
__________________________________________________ _____


a0157202 (AT) yahoo (DOT) com (Dave Rupp) wrote in message news:<c8dba183.0402171334.4e89a026 (AT) posting (DOT) google.com>...
Quote:
What does datalength(rtrim...) do? I can guess the datalength, but
what is rtrim? I am running ASA 7.0.

TIA,
Dave...

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.