You are not logged in or registered. Please login or register to use the full functionality of this SYBASETEAM.COM Website...
Current time: 03-12-2010, 07:54 PM Hello There, Guest! (LoginRegister)
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ltrim and rtrim functions in sybase
09-09-2009, 01:51 AM
Post: #1
ltrim and rtrim functions in sybase
Using ltrim and rtrim functions in sybase

ltrim

Description

Returns the specified expression, trimmed of leading blanks.
Syntax

ltrim(char_expr | uchar_expr)

Parameters

char_expr

is a character-type column name, variable, or constant expression of char, varchar, nchar, or nvarchar type.

uchar_expr

is a character-type column name, variable, or constant expression of unichar or univarchar type.

Examples
Example 1

select ltrim(" 123")

-------
123

-------------------------------------------------------------------------------------------------------

rtrim

Description

Returns the specified expression, trimmed of trailing blanks.

Syntax

rtrim(char_expr | uchar_expr)

Parameters

char_expr

is a character-type column name, variable, or constant expression of char, varchar, nchar, or nvarchar type.

uchar_expr

is a character-type column name, variable, or constant expression of unichar or univarchar type.

Examples
Example 1

select rtrim("abcd ")

--------
abcd
Find all posts by this user
Quote this message in a reply

Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Java and SQL user-defined functions in Sybase ASE crazYoga 0 121 02-02-2010 02:26 AM
Last Post: crazYoga
  sybase string functions with examples john 0 200 07-07-2009 02:30 AM
Last Post: john
  Sybase User defined SQL functions zaadmin 0 212 11-10-2008 11:19 PM
Last Post: zaadmin

Forum Jump: