| Author |
Topic  |
|
|
sportsguy
Starting Member
USA
29 Posts |
Posted - 02/06/2013 : 12:43:58
|
Money field
Allow Nulls with default of Zero? Do Not allow Nulls with default of Zero?
The question comes from the priority of loading and conversion, such that i either code the loading or use the table functionality. .
remember, I am just an SQL hack, although I have been designing MS Access tables, forms queries and coding for over 20 years. . .
thanks sportsguy
MS Access 20 years, SQL hack |
|
|
Lamprey
Flowing Fount of Yak Knowledge
3833 Posts |
Posted - 02/06/2013 : 13:08:37
|
| I'll ask a question back. In your case, is NULL different that Zero? I ask becase it CAN be different. But, typically, I'd assume that it should be not null. |
 |
|
|
James K
Flowing Fount of Yak Knowledge
1527 Posts |
Posted - 02/06/2013 : 13:10:23
|
It really depends on the business requirements. To my way of thinking, having a default and allowing NULL serve two different purposes, although sometimes people use a 0 (or other logically impossible value) as an indicator of having no value at all.
There is a little bit of storage used for null indicator for variable length data types. Also, if you have a lot of null values, sparse columns may save you storage depending on the percentage of nulls, so that might be a consideration when deciding whether to allow nulls or not. |
 |
|
|
sportsguy
Starting Member
USA
29 Posts |
Posted - 02/06/2013 : 13:44:39
|
Not a question of having a null value, there aren't any null values anywhere. that was not the question. There are only zeros or non zero numbers.
The question is one of loading and table structure.
Currently having the table transform the null to zero for me is the easiest method instead of programming the null to zero. . . I haven't tried the Not Null with a default value of zero. . . yet, but I will answer the question eventually. .
sportsguy
MS Access 20 years, SQL hack |
 |
|
|
sportsguy
Starting Member
USA
29 Posts |
Posted - 02/06/2013 : 13:45:53
|
Lamprey, thanks for that answer. .
MS Access 20 years, SQL hack |
 |
|
| |
Topic  |
|