November 29, 2009 at 11:50 pm
DECLARE @Input Varchar(20)
SET @Input='Parthi'
Select @Input
I need O/P like:'Parthi's'
How to Get "Parthi's"
If i want to insert into a table, how to insert it
after inserting into table how to get in the select statement
Thanks
Parthi
November 30, 2009 at 12:13 am
DECLARE @Input Varchar(20)
SET @Input = 'Parthi'
SET @Input = @Input + '''s'
Select @Input
Escape a quote by doubling it.
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
November 30, 2009 at 12:37 am
Hi Gail thanks
how to get this
Select 'Hi I 'll be there @6'O clock '
Thanks
Parthi
November 30, 2009 at 1:25 am
As I said, escape a quote by doubling it. So if you want single quotes within a string, put two of them to make a single ' character.
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
December 1, 2009 at 8:08 am
As mentioned by Gail above:
DECLARE @Input Varchar(40)
SET @Input='Hi I ''ll be there @6''O clock'
Select @Input
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply