May 7, 2010 at 12:33 pm
Might be a slightly cleaner way, but this works:
select case charindex('.', Column1)
when 0 then Column1
else stuff(Column1, charindex('.', Column1), charindex('\', Column1, 3) - charindex('.', Column1) - 1, '') end
from @t_temp;
May 7, 2010 at 12:38 pm
May 7, 2010 at 12:40 pm
bteraberry (5/7/2010)
Of course ^ISNULL is better than doing a CASE.
Oh good, I was able to save face for that substring inefficient code. 😀
-- Cory
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply