Default column value using default or formula properties
Posted on 2006-06-12
I have a date column on my table defined as datetime (call_date) (not necessarily current date)
I also have 2 columns named call_month and call_year ( both defined as varchar).
I would like the call_month and call_year values to be defaulted to month and year portions of call_date respectively.
Is it possible to do this using the default or formula values for the field definitions?
For example if call_date is 5/24/06....call_month would default to 5 and call_year would default to 06
I know I could do this using a trigger but just curious....