JimiJ
MVP Developer
Registered: 03/30/05
Posts: 3,648
|
|
|
Reply with quote | #16 | if blank is extremely necessary, the way to do it is this:
Set 'na' as column default and create a simple After Insert-Trigger to reset it to blank (' ') when value is 'na'.
To make it easy for you this is the sample trigger:
AFTER INSERTNOT FOR REPLICATIONAS Begin SET NOCOUNT ON;Declare @f varchar(20)IF EXISTS(SELECT * FROM inserted)IF Not EXISTS(SELECT * FROM deleted)Select @f = Field1 From Inserted BeginUpdate R SET Field1=Case When @f ='na' Then ''Else @fEnd From tblData1 R Inner JOIN Inserted ION R.FieldID=I.FieldID End End Cheers
__________________ Jaime Jegonia
JimiTron Software
JimiTron.Net | JimiTron.Com |
| |
expuser Registered: 03/13/08
Posts: 48
|
|
|
Reply with quote | #17 | Thanks Jimi. I already went ahead by modifying the base classes. The idea is similar though.
|
| |
afisher
Co-Founder
Registered: 04/22/04
Posts: 2,026
| |