Solved

Make it NULL by default

Posted on 2009-05-08
5
209 Views
Last Modified: 2012-05-06
For some business reason i have to either avoid values updating a column in a table. I cannot controt the data import, all i am trying to do is make that column to null whatever value it has.. the column should always have null, so either i can avoid the incoming fileds or change it after feed.. so is there any way to do that?
0
Comment
Question by:parpaa
  • 3
5 Comments
 
LVL 13

Accepted Solution

by:
Philip Pinnell earned 250 total points
ID: 24337357
You could have a trigger on update that changes the value back to null whenever an attempted update takes place.
0
 

Author Comment

by:parpaa
ID: 24337388
is there anything else besides this?? this sounds good...
0
 
LVL 13

Expert Comment

by:Philip Pinnell
ID: 24339303
I can't think of another sure way
0
 
LVL 13

Expert Comment

by:Philip Pinnell
ID: 24339343
Thanks
0
 

Expert Comment

by:aangrish
ID: 24339356
As you don't have control over the import, a before insert or update trigger is the way to go. Depending on your database, ensure it fires only on an update to that particular field.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question