Link to home
Start Free TrialLog in
Avatar of PtboGiser
PtboGiserFlag for Canada

asked on

Default column to Null value

I want to Default my addnum column = null Where parcel.address_ID is null. Both in the same table.

In the Default Value or Binding Column properties i added this but its not working.  ('Set addnum = null Where parcel.address_ID is null')

I would like my addnum column to be populated with a Address Vale or be null.
Addnum column is nvarchar(10)
Address_ID colunm is INT

Thanks
Avatar of Jesus Rodriguez
Jesus Rodriguez
Flag of United States of America image

You need to use a trigger on Insert.
Just check to see if a value has been assigned, and if not, go grab the correct one and use it
ASKER CERTIFIED SOLUTION
Avatar of Jesus Rodriguez
Jesus Rodriguez
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PtboGiser

ASKER

Thx i'll try it.