We have a form that has multiple fields of different data type, including string, datetime and numbers.
Our customer want to be able to write N/A (Not Applicable) in any of these fields, as well as being able to leave it blank.
Does someone has an idea on how I should design my Sql Server table so it can support a value, NULL or N/A?
We are using Sql Server 2008.
If N/A and blank are truly different values you need to support, I would say to create the field as a nullable field (in which case the NULL would represent the blank value), and then include a second bit field for [FieldName]NotAvailable or [FieldName]Specified.
Granted, you would be using two separate fields to represent a single logical concept, trying to force it all into one field causes two concepts to be stored in the same field (the field is interpreted one way, unless there is some magical value, then it means something else). This way, with the separate field, it is far more clear what the expected behavior of the fields is.