Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1406

Re: How to determine true contents of not null columns that display as empty

Newsgroups comp.databases.ms-sqlserver
Date 2013-03-07 09:29 -0800
References <60db4087-d8ae-4cbf-9a40-531637ccef0e@googlegroups.com>
Message-ID <58d91000-cfd5-40c8-8cd4-bbfb34a2b944@googlegroups.com> (permalink)
Subject Re: How to determine true contents of not null columns that display as empty
From rja.carnegie@gmail.com

Show all headers | View raw


A varchar or nvarchar string with length zero isn't NULL, but
it doesn't have an ASCII code, since it doesn't have a first 
character.

Consider "UPDATE theTable SET acceptor = '' "

My SQL Server documentation says that ASCII() "Returns the ASCII 
code value of the leftmost character of a character expression
(and by the way, on nvarchar you do want the UNICODE function 
instead), but doesn't mention this case - no leftmost character, 
so, ASCII returns NULL.

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How to determine true contents of not null columns that display as empty Mark D Powell <Mark.Powell2@hp.com> - 2013-03-07 09:16 -0800
  Re: How to determine true contents of not null columns that display as empty rja.carnegie@gmail.com - 2013-03-07 09:29 -0800
  Re: How to determine true contents of not null columns that display as empty Erland Sommarskog <esquel@sommarskog.se> - 2013-03-07 22:55 +0100
    Re: How to determine true contents of not null columns that display as empty rja.carnegie@gmail.com - 2013-03-07 15:06 -0800
  Re: How to determine true contents of not null columns that display as empty Mark D Powell <Mark.Powell2@hp.com> - 2013-03-14 10:56 -0700

csiph-web