Mark Minasi's Reader Forum
Mark Minasi's Reader Forum
Home | Profile | Register | Active Topics | Active Polls | Members | Search | FAQ | Minasi Forum RSS Feed
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Email, Databases, Sharepoint and more
 SQL Server
 Deleting data from colums in a table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Curt
Moderator

USA
6806 Posts
Status: offline

Posted - 10/13/2011 :  2:48:10 PM  Show Profile  Visit Curt's Homepage  Reply with Quote
In the real world. There is a real world out there and it is dangerous.
For instance, a company is not very IT security aware.
But they have data in tables like payment type, social Security numbers, Medical information.

Can I use to the update command to remove data in fields of the tables?
I could delete rows from the table but that's not practical.


Curt Spanburgh
Microsoft Certified Business Solution Specialist.
Dynamics CRM MVP
Contributing Editor, Windows IT Pro

He that is walking with wise persons will become wise, but he that is having dealings with the stupid ones will fare badly.
Proverbs 13:20


netmarcos
Honorable But Hopeless Addict

USA
2272 Posts
Status: offline

Posted - 10/13/2011 :  3:18:52 PM  Show Profile  Visit netmarcos's Homepage  Click to see netmarcos's MSN Messenger address  Look at the Skype address for netmarcos  Send netmarcos a Yahoo! Message  Reply with Quote
Sure you can, as long as the application above the DB will allow the direct modification of the data without crying Just set them all to a generic value or NULL where allowed.

UPDATE [MY_SPIFFY_HR_DATABASE].[dbo].[_SUPERSECRETEMPLOYEE_DETAILS]
SET [Employee_SSN] = '000-00-0000'
Where IS NOT NULL [Employee_SSN]
GO

Mark M. Webster

Genius may have its limitations, but stupidity is not thus handicapped. - Elbert Hubbard

Go to Top of Page

Curt
Moderator

USA
6806 Posts
Status: offline

Posted - 10/13/2011 :  3:42:31 PM  Show Profile  Visit Curt's Homepage  Reply with Quote
Thanks Mark.
I'll try it in test.
It's the table relations I'm worried about.

I'm sitting here in a brain freeze.
Thanks.

Curt Spanburgh
Microsoft Certified Business Solution Specialist.
Dynamics CRM MVP
Contributing Editor, Windows IT Pro

He that is walking with wise persons will become wise, but he that is having dealings with the stupid ones will fare badly.
Proverbs 13:20


Go to Top of Page

Curt
Moderator

USA
6806 Posts
Status: offline

Posted - 10/13/2011 :  4:07:24 PM  Show Profile  Visit Curt's Homepage  Reply with Quote
A little change there Mark.
I'm using the Great Plains Fabricam company database or test area.

It used to be called "The world online" thus TWO.
So if I wanted to remove the card name from the table based on a set of users I could modify this.
Great, and thanks for helping.


UPDATE TWO.dbo.SOP10103
SET CARDNAME = 'NONE'
Where CARDNAME IS NOT NULL
GO

Curt Spanburgh
Microsoft Certified Business Solution Specialist.
Dynamics CRM MVP
Contributing Editor, Windows IT Pro

He that is walking with wise persons will become wise, but he that is having dealings with the stupid ones will fare badly.
Proverbs 13:20


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Mark Minasi's Reader Forum © 2002-2011 Mark Minasi Go To Top Of Page
This page was generated in 0.05 seconds. Snitz Forums 2000