Hi guys,
I am trying to remove extension _EXT from the record if there is any and at the moment I used the below query.
But I found this query is abit too complex, do you guys have any simpler query for this purpose?
thanks guys,
I am trying to remove extension _EXT from the record if there is any and at the moment I used the below query.
Code:
SELECT @type = case when charindex('_EXT', type) > 0 then substring(type, 1, len(type)-len('_EXT')) else type end
FROM table
But I found this query is abit too complex, do you guys have any simpler query for this purpose?
thanks guys,