JimiJ

MVP Developer
Registered: 03/31/05
Posts: 4,028
|
| | 04/12/08 at 02:39 AM | 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 |
| Loading... | |
expuser Registered: 03/13/08
Posts: 48
|
| | 04/12/08 at 08:54 AM | Reply with quote | #17 |
|
Thanks Jimi. I already went ahead by modifying the base classes. The idea is similar though.
|
| Loading... | |
afisher

Co-Founder
Registered: 04/22/04
Posts: 2,455
| |