Minnu
SSCertifiable
Points: 6451
More actions
June 5, 2015 at 2:57 am
#318049
Hi Team,
How to remove first and Last chacter from below select query.
SELECT LTRIM(RTRIM(REPLACE(col_1,'Year_',''))),
FROM Years
June 5, 2015 at 3:13 am
#1803250
How to remove first and last char from below select query
SELECT LTRIM(RTRIM(REPLACE('Micro Soft','M','m')))
output should be : 'icro Sof
spaghettidba
SSC Guru
Points: 105732
June 5, 2015 at 3:20 am
#1803252
SUBSTRING does what you desire.
SELECT SUBSTRING(LTRIM(RTRIM(REPLACE('Micro Soft','M','m'))), 2, LEN(LTRIM(RTRIM(REPLACE('Micro Soft','M','m')))) -2 )
-- Gianluca Sartori
June 5, 2015 at 3:27 am
#1803253
Perfect...
Thank You.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply