Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Rosembm1
Starting Member
15 Posts |
Posted - 2011-02-07 : 08:32:46
|
| Dear Experts,I am migrating data into a FACT table and have 0,1, missing data values. I cannot using a zero for missing for buisiness rule reasons. The problem is I'd like to address the issue of null numeric data since it is a "bad practice". I played around with two options. (1) Use a neg number for missings. That causes issues with the reporting since I can't easily apply a filter. (2) convert the null to am empty string. I believe that creates a zero for the reporting. At this point, I'd like to throw this out to the SQL experts to let me know what they suggest. The pragmatic folks tell me not to worry about it, but I'd like to do this as right as the reality allows. Thanks for your help with this. MWRosenblattSpins Yak |
|
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2011-02-07 : 08:40:04
|
| 1) What's the issue with using null? That's what it means - missing value.2) Don't use a string unless it *is* a string.In any case store your data as it is. If you need to do any fancy stuff with it, write a SP and/or deal with it in the front end. |
 |
|
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2011-02-07 : 09:01:11
|
| it would be helpful if you explain all this with the help of example e.g. existing data and the required output Cheers!MIK |
 |
|
|
Rosembm1
Starting Member
15 Posts |
Posted - 2011-02-07 : 11:01:39
|
| I appreciate the feedback. I have been getting two schools of thought from our SQL experts (1) The Pragmatic view: Leave it alone. The business covers it and the reporting will be fine. (2) The fastidious view: It is bad practice to have nulls in the numeric field. If I can easily address point 2, I am willing to invest more time in making some changes. This particular application involves clinical data where some of the measures are going to be 1, 0 and NULL. Pragmatically, NULL is fine. Nevertheless, I was told there may be a SQL issue with the storage of a null int with the records. The takeaway is for people to address data management and business rules when dealing with missing values and to think through with just using nulls. I welcome more debate, which I find helpful and I know this will come up with others. MWRosenblattSpins Yak |
 |
|
|
|
|
|