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 |
|
jaimin
Starting Member
21 Posts |
Posted - 2007-10-15 : 05:23:16
|
| how should i use replace function in sql statement??in my scenario, user enters the meeting ID and i want that if user enters the meeting ID which includes apostrophe('), the stored procedure should remove the apostrophe before inserting it into database table.my stored procedure accepts two parameters.Is there any way to solve my problem??Jaimin |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-10-15 : 05:32:42
|
REPLACE(Col1, '''', '') E 12°55'05.25"N 56°04'39.16" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-15 : 07:27:27
|
| To know the behavior of single quotes, run thisselect '','''','''''','''''''',''''''''''Also, you should validate data at front end and then send only valid data to sql server tableMadhivananFailing to plan is Planning to fail |
 |
|
|
cbr600gyrl
Starting Member
1 Post |
Posted - 2008-04-11 : 12:08:04
|
Thanks Madhivanan! The select query helped me.  quote: Originally posted by madhivanan To know the behavior of single quotes, run thisselect '','''','''''','''''''',''''''''''Also, you should validate data at front end and then send only valid data to sql server tableMadhivananFailing to plan is Planning to fail
|
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-04-14 : 03:18:17
|
quote: Originally posted by cbr600gyrl Thanks Madhivanan! The select query helped me.  quote: Originally posted by madhivanan To know the behavior of single quotes, run thisselect '','''','''''','''''''',''''''''''Also, you should validate data at front end and then send only valid data to sql server tableMadhivananFailing to plan is Planning to fail
ThanksAlso refer http://sqlblogcasts.com/blogs/madhivanan/archive/2008/02/19/understanding-single-quotes.aspxMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|