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 |
jpotucek
Constraint Violating Yak Guru
273 Posts |
Posted - 2011-10-27 : 12:25:00
|
I have a table in my sql server 2005 database where I need to replace all the values in one particular column with null values. the column excepts NULL values and is currently populated with email addresses. I need to programatically replace all of the email addresses with a NULL Value. Short of exporting the table, removing the email addresses and reimporting the data into the table, how can I do this with T-SQL? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-27 : 12:28:53
|
[code]UPDATE tableSET Email=NULL[/code]sets all emails to NULL in the tablewhere do you want to export table data to?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
jpotucek
Constraint Violating Yak Guru
273 Posts |
Posted - 2011-10-27 : 15:49:09
|
Thank you. They just wanted the emails nulled out in that column one when I refresh from PROD to DEV and the update statement worked like a charm. seems like such a simple thing now !! |
 |
|
X002548
Not Just a Number
15586 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-28 : 06:44:20
|
quote: Originally posted by jpotucek Thank you. They just wanted the emails nulled out in that column one when I refresh from PROD to DEV and the update statement worked like a charm. seems like such a simple thing now !!
what we do is not to make them null but run a scrambling algorithm in update to scramble the data before we give it to our developers for playing with------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|