all groups > sql server mseq > december 2005 >
You're in the

sql server mseq

group:

query


query Tiffany
12/2/2005 1:38:03 AM
sql server mseq:
hi

i have some models that end with +SP e.g. 1234+SP, abcd+SP I want to remove
only the +SP from these models. May i know how can i do it. Thank you

Re: query Hugo Kornelis
12/3/2005 12:37:37 AM
[quoted text, click to view]


Hi Tiffany,

If you mean that the +SP is part of the data in your table and
you want to show the data without the +SP, then use

SELECT CASE
WHEN YourColumn LIKE '%+SP'
THEN LEFT(YourColumn, LEN(YourColumn - 3))
ELSE YourColumn
END
FROM ....

If that's not what you want, then please check out www.aspfaq.com/5006,
an excellent description of what information you need to provide if you
want to help us help you.

Best, Hugo
--

AddThis Social Bookmark Button