Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Escape Spostropes

Author  Topic 

kalyan.cse05
Yak Posting Veteran

74 Posts

Posted - 2010-11-20 : 05:57:58
What i should do to escape apostropes(') present in a varchar datatype.
EXAM: I have a table and it has a field whose data type is varchar. But now the entry for the field contains apostropes(') in it and i am not able to enter that data into the table.It gives me the below error:
run time error '-2147217900(80040e14)'

For example : The value which I want to enter is "Arijit B'ishas"

So can someone plz help me

kalyan Ashis Dey

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-11-20 : 08:00:47
double the apostrophe

asd''asd

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-11-21 : 03:55:23
see
http://beyondrelational.com/blogs/madhivanan/archive/2008/02/19/understanding-single-quotes.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -