I have a table field with type of data varchar, without permission for
entrance of null data
Doubt:
If I don't type anything in the field, the validation of null values at
table level usually happens, however if I type some text and later to
exclude the text, the validation doesn't happen plus, in other words, it
accepts what it would be null value, or it will be that for the exclusion
the field is filled out with characters that are not treated in the
validation as being null.Hi
I doubt that after editing it is null. The value is probably a zero length
string "".
You UI must then decide, if the length of a string is 0, it must write a
null instead of the zero length string.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Frank Dulk" <fdulk@.bol.com.br> wrote in message
news:%23o2aZKNWFHA.3840@.tk2msftngp13.phx.gbl...
>I have a table field with type of data varchar, without permission for
> entrance of null data
> Doubt:
> If I don't type anything in the field, the validation of null values at
> table level usually happens, however if I type some text and later to
> exclude the text, the validation doesn't happen plus, in other words, it
> accepts what it would be null value, or it will be that for the exclusion
> the field is filled out with characters that are not treated in the
> validation as being null.
>|||With what kind of program are you changing the values of the column, I think
you change them to '' (an empty string) which isnt actually NULL. If you
change the Value of an attribute in EM you have to press CTRL + 0 to really
insert NULL. If you defined a check constaint at column level (ColumnName
datatype NOT NULL) this Constraint will fire. If you also dont want to
allow empty string values you additionaly have to define a check constraint
which count the LENGTH of the string or checks for an empty string, I would
prefer that Constraint
(ColumnName datatype NOT NULL CHECK(LEN(ColumnName ) > 0)
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Frank Dulk" <fdulk@.bol.com.br> schrieb im Newsbeitrag
news:%23o2aZKNWFHA.3840@.tk2msftngp13.phx.gbl...
>I have a table field with type of data varchar, without permission for
> entrance of null data
> Doubt:
> If I don't type anything in the field, the validation of null values at
> table level usually happens, however if I type some text and later to
> exclude the text, the validation doesn't happen plus, in other words, it
> accepts what it would be null value, or it will be that for the exclusion
> the field is filled out with characters that are not treated in the
> validation as being null.
>
Monday, February 20, 2012
permission for entrance of null data
Labels:
database,
datadoubtif,
entrance,
field,
forentrance,
microsoft,
mysql,
null,
oracle,
permission,
server,
sql,
table,
type,
varchar
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment