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.
Author |
Topic |
davidsong
Starting Member
6 Posts |
Posted - 2007-04-12 : 23:33:09
|
Hi all,how to insert a long text which contains singe quotes or comma?thanks a lotdavid |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2007-04-12 : 23:50:13
|
comma shouldn't be a problem.for single quote, double 'em upo'reilly becomes o''reillyinsert yourTable (lname)value ('o''reilly') -- <--- note thats two single quotes, not one double quote |
 |
|
davidsong
Starting Member
6 Posts |
Posted - 2007-04-13 : 01:25:22
|
Thanks a lot! |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-04-13 : 03:36:45
|
Within a string every single quote should be doubledRun this and see what it returnsSelect '','''','''''',''''''''MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|