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 |
|
shubhada
Posting Yak Master
117 Posts |
Posted - 2007-06-13 : 02:29:51
|
| I have one procedure call as followcm_insert_test 'O'Marry',NUll,'This is invalid'the first parameter is EmpName Second is the Date and Third parameter is Error Message.I am getting this call from front end application.when i executed this call, i am getting the following error Incorrect syntex near OPlease tell me how I can handle this.SQLTeam |
|
|
pootle_flump
1064 Posts |
Posted - 2007-06-13 : 02:33:57
|
Escape the quotecm_insert_test 'O''Marry',NUll,'This is invalid' |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-06-13 : 02:34:17
|
use 2 single quotecm_insert_test 'O''Marry',NUll,'This is invalid' KH |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-06-13 : 02:34:41
|
by 21 secs KH |
 |
|
|
pootle_flump
1064 Posts |
Posted - 2007-06-13 : 02:37:14
|
quote: Originally posted by khtan
by 21 secs KH
|
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-13 : 09:24:38
|
| Inside a single quote you need to double itSee here how it worksSelect '','''','''''','''''''',''''''''''MadhivananFailing to plan is Planning to fail |
 |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-06-13 : 11:21:35
|
| If you are using parameterized queries you should not have to worry about escaping any quotes.Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
|
|
|
|
|