Re: Updating to NULL instead of zero
From: Scott Morris (bogus_at_bogus.com)
Date: 03/11/04
- Next message: Eric Sabine: "Re: Updating to NULL instead of zero"
- Previous message: Rocio: "SQLDMO: howto obtain logical file names from a BAK file"
- In reply to: RobertS: "Re: Updating to NULL instead of zero"
- Next in thread: Eric Sabine: "Re: Updating to NULL instead of zero"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 11 Mar 2004 13:13:20 -0500
A trigger is the only way that I know of to do this. A constraint is used
for checking and cannot modify existing data.
However, if the code is that convoluted, how can you be certain that
changing the expected value of zero to NULL will not adversely impact
something else? Code that implicitly assumes that data is not null often
fails to work correctly when NULL is present. Test thoroughly!
"RobertS" <anonymous@discussions.microsoft.com> wrote in message
news:b65e01c40792$cae8f1a0$a101280a@phx.gbl...
> >Look up NULLIF function in SQL Server Books Online.
> >
> But I don't have access to the UPDATE statement, so I
> can't use any functions. If I did, I would just change the
> 0 to a NULL.
- Next message: Eric Sabine: "Re: Updating to NULL instead of zero"
- Previous message: Rocio: "SQLDMO: howto obtain logical file names from a BAK file"
- In reply to: RobertS: "Re: Updating to NULL instead of zero"
- Next in thread: Eric Sabine: "Re: Updating to NULL instead of zero"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|