March 27, 2013 at 10:08 am
Hello Everyone,
What would be the best way to go about converting a part of this Filename from upper case to lower case?
FROM: APR0111OFR_AAAAAAAA_01
TO: Apr0111OFR_AAAAAAAA_01
March 27, 2013 at 10:21 am
Something like this?
declare @filename varchar(255)
set @filename = 'APR0111OFR_AAAAAAAA_01'
select replace(@filename, substring(@filename,2,2),lower(substring(@filename,2,2)))
March 27, 2013 at 10:32 am
I do not know what is your exact requirement, however, this piece of code may help you.
declare @from varchar(50) , @to varchar(50)
select @from = 'APR0111OFR_AAAAAAAA_01'
select @to = stuff(@from,2,2, lower(substring(@from,2,2)))
Print @to
-----
Seraj Alam
Return to scociety from where you received a lot.
March 27, 2013 at 11:17 am
Thanks so much guys this is greatly appreciated....
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy