Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 22, 2011 06:19 AM by iGulfam
Dec 22, 2011 06:09 AM|LINK
i am creating below query
select cast(replace(cast(Topic_name as nvarchar(max)),'_',' ') as ntext) as topic
This query replace the '_'(underscore) with the space( )
like bodmas_1 to bodmas 1
i need a more query with this query that will give me the output like Bodmas 1 (means first character in a uppercase)
how it can be possible or how i can replace the underscore with the space and first character in a uppercase
Plz help me...
Dec 22, 2011 06:16 AM|LINK
create a function for that and use like...
Dec 22, 2011 06:19 AM|LINK
Use following Query
REPLACE(UPPER(SUBSTRING(Topic_name, 1, 1))+LOWER(SUBSTRING(Topic_name, 2, LEN(Topic_name))), '_', ' ') AS topic