Reputation: 6920
Basically I am trying to trim the left-most character if and only if it as an apostrophe.
My script is as follows
Identifier =
CASE
WHEN LEFT(Identifier, 1) = '' -- I think this is wrong
THEN RIGHT(Identifier, LEN(Identifier) - 1) ELSE Identifier
END,
What I want to do is remove the first character if and only if it is an apostrophe but I don't know how to perform the comparison with the single quote.
This is in SQL Server 2008.
Upvotes: 1
Views: 146