July 11, 2007 at 3:43 am
All,
There is a requirement where i need to insert a value say (Microsoft's).
This should not be achieved with concatenating (+) but with someother method. please let me know if there is any query to achieve this.
Any code apart from the below.
select 'Microsoft' + '''' + 's'
With regards,
Sudarsan S
July 11, 2007 at 3:53 am
Hi Sudarsan,
I'm not really sure what your situation is for wanting to do this. Knowing a little more may help in find the best solution for you.
In the mean time here is a way:
SELECT STUFF('Microsoft',LEN('Microsoft'),LEN('''s')+1,RIGHT('Microsoft',1)+ '''s')
hope this helps
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
July 11, 2007 at 4:01 am
Maybe I'm misunderstanding your requirement, but...
SELECT
'Microsoft''s'
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply