If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Is there any function in Sybase to replace Initcap funtion in oracle

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-17-11, 00:22
reddy_546 reddy_546 is offline
Registered User
 
Join Date: May 2010
Location: Hyderabad, India
Posts: 16
Is there any function in Sybase to replace Initcap funtion in oracle

I have data as "HYderabaD ROCKS and CHENNAI Sucks"...I want output as "Hyderabad rocks and chennai sucks".

How to get this using Sybase 15.0

Thanks a lot in advance!!
__________________
-PavanKumar M Reddy
Reply With Quote
  #2 (permalink)  
Old 02-17-11, 10:09
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
Create one yourself e.g.
Code:
create function dbo.intcap ( @c1 varchar(8000) )
returns varchar(8000) as
begin
  return upper(left(@c1,1))+lower(substring(@c1,2,7999))
end
Then you can use it e.g.
Code:
select dbo.intcap(name) from sysobjects

Last edited by pdreyer; 02-17-11 at 10:12.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On