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 |
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2006-11-10 : 05:42:53
|
| Hi experts,can you please tell me how can i insert the string " india's currency is rupee "this ' symbol is giving me problem while i'm inserting data into currency table.thank you very muchVinod |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-10 : 05:44:24
|
Replace single quote with two single quotes.select 'india''s currency is rupee' Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2006-11-10 : 05:47:25
|
| I think it gives the output like thisindia s currency is rupee what about this ' symbol there? is it not possible to take that?Vinod |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2006-11-10 : 05:50:19
|
| oh great thank youit is giving the correct output thank you harshacan you please tell me tha logic there?Vinod |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-11-10 : 05:58:11
|
| Logic is very simple.Since quote character is normally used as string delimiter, to remove this special meaning attached to it, you need to suffix it with another quote character.Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
sunsanvin
Master Smack Fu Yak Hacker
1274 Posts |
Posted - 2006-11-10 : 06:00:36
|
| okok' is a delimiter so that it forgets the immiediate string.thank you very muchVinod |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-11-10 : 10:50:06
|
| Select '','''','''''','''''''',''''''''''MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|