This topic is locked

What value is placed in a null field?

7/18/2004 10:23:57 PM
ASPRunnerPro General questions
author

Within my DB I have a column named CompletedDate. This column contains shortdate information. The data is <NULL> by default in SQL. When ASPRunner touches a record that value is set to a blank. I am not certain what the blank value really is. When I perform a search in ASPRunner I look for CompletedDate = space (I use the spacebar to make a space char) and get the return back. If I enter a space in the SQL database the record stays as <NULL>. The wierd thing is that ASPRunner is not returning the data on those records that have neve been touched by ASPRunner (Those displaying <NULL> in SQL).

Sarjent 7/18/2004

Sorry, I thought I was signed in.
BY When viewing all records I do get everything returned. Its when Search or Advanced Search is used they do not come back. The data type on that field is NVARCHAR.

Sergey Kornilov admin 7/19/2004

Sarjent,
currently ASPRunner cannot search for NULL fields. This feature will be added in one of the following versions.

Sarjent 7/19/2004

I probably wasn't clear. Some kind of value gets put into the SQL database if no value is given. Its not a <NULL> or else it would display as such when looking at it in Enterprise Manager. Could it be a zero length string and thats why the display in E.M. shows as a empty value for that column? reason I ask is because I periodically would like to reset my column for CompletedDate and would like to figure out how to script this.

Sarjent 7/19/2004

Sometimes typing outloud must do good things for the brain. Change the default value in SQL for that column to be (N'')

Works like a champ! Now onto making an SQL Query to update all records for me..