Link to home
Start Free TrialLog in
Avatar of KWDave
KWDaveFlag for United States of America

asked on

MS SQL 2008 What is the difference between a null field and an empty field?

I need to edit some MS SQL data and used an ACCESS project to do it. The data was in a view, and the editing went fine.

When i ran the application i got inconsistent results.

Looking at the data in MSSQL SMS i noted a difference between records i entered through ACCESS and other records: The ACCESS entered records contained NULL for empty fields. Other records had empty fields (necessary for the application) but did not show the NULL value.

The fields in question are varchars.

What causes the different presentation in SMS, and how can I make ACCESS create acceptable values?
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

If by empty you mean it is '', then yes, they are fundementally different.  A value of NULL means it is unknown, which is not the same as ''.
Avatar of KWDave

ASKER

Thanks for the try, but no joy yet.

I realize null and empty are different conditions. I don't know how to distinguish them in ACCESS, and the behave differently in MS SQL.

To test what i think was suggested, i entered '' in the fields in ACCESS. In MS SQL Server Management Studio the newly entered data showed as '', not empty as i need. when i deleted the '' in ACCESS, the fields again show as null in MS SQL SMS.

Unfortunately the SMS editor only allows editing the first 200 rows. The table has almost 1000 rows. There are only a handful that need editing. If ACCESS won't behavie, is there another editor that I could use to directly edit MS SQL tables?

The only other thing i can think of is to edit with a special character in ACCESS, and update the data in a query.

This is is ms sql 2008 R2, and Access in office 10.
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
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 KWDave

ASKER

This issue is too unique and trivial to add to the knowledge base
>>This issue is too unique and trivial to add to the knowledge base <<
I agree that this question is trivial and has no value in the PAQ, so you best request that the question be deleted.