Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Make it NULL by default

Posted on 2009-05-08
5
Medium Priority
?
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 13

Accepted Solution

by:
Philip Pinnell earned 1000 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

704 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