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 |
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2006-04-18 : 08:26:27
|
| select ssn from members i get string filed of value '264-93-2932' how can i make as '264932932' in the table ie : when i giveselect ssn from members i want as '264932932' |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-04-18 : 08:30:23
|
| select Replace(ssn,'-','') from members Srinika |
 |
|
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2006-04-18 : 08:34:21
|
| Thanks .,I want to change the field value itselfI try updates members set ssn = Replace(ssn,'-','') error :Server: Msg 170, Level 15, State 1, Line 1Line 1: Incorrect syntax near '='. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-18 : 08:42:47
|
updates members set ssn = Replace(ssn,'-','') KH |
 |
|
|
shanmugaraj
Posting Yak Master
219 Posts |
Posted - 2006-04-18 : 08:49:57
|
| Thanks ... i have found .. the error after i post .. thanks for the reply |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-18 : 09:00:59
|
| It is better to keep the data as they are and only use replace function when queryingshanmugaraj, most of your questions seem to be easy. Only thing is you need to learn SQL fully. Also make use of sql server help filehttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|