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 |
|
mahesh_bote
Constraint Violating Yak Guru
298 Posts |
Posted - 2006-05-02 : 00:30:15
|
| Hi,I have a string like "D'Souza" and wants to insert in a given format. Before inserting it, I replaces "'" with "", but now I want to insert as it is. What datatype should be use to insert this string in such manner?Thanks in advanceBMahesh |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-05-02 : 00:37:09
|
you can use char or varchar. Just specify the single quote twicecreate table #temp( yourcol varchar(100))insert into #temp select 'D''Souza'select * from #temp KH |
 |
|
|
mahesh_bote
Constraint Violating Yak Guru
298 Posts |
Posted - 2006-05-02 : 01:11:52
|
| thnx a lot dearBMahesh |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-05-02 : 01:33:09
|
| orinsert into #temp select 'D'+char(39)+'Souza'MadhivananFailing to plan is Planning to fail |
 |
|
|
mahesh_bote
Constraint Violating Yak Guru
298 Posts |
Posted - 2006-05-02 : 02:21:39
|
| thanx madhivanan its also workingBMahesh |
 |
|
|
|
|
|