PC Review


Reply
Thread Tools Rate Thread

Change blanks to 0 (zero)

 
 
Jodie
Guest
Posts: n/a
 
      18th Mar 2010
I need to do an update to change all blank fields to a 0 (zero). In the
criteria, I have tried IsNull and it is not returning any of the blank
records. I have tried IsEmpty and I get a message that say mismatch. What
can I enter in the criteria that will recognize all of the blank fields?
--
Thank you, Jodie
 
Reply With Quote
 
 
 
 
KARL DEWEY
Guest
Posts: n/a
 
      18th Mar 2010
>>What can I enter in the criteria that will recognize all of the blank fields?
There are more than one thing that can appear as a blank. There are nulls
and zero lenght strings.
Use this to pull both --
Is Null OR ""
That is two double quotes.

--
Build a little, test a little.


"Jodie" wrote:

> I need to do an update to change all blank fields to a 0 (zero). In the
> criteria, I have tried IsNull and it is not returning any of the blank
> records. I have tried IsEmpty and I get a message that say mismatch. What
> can I enter in the criteria that will recognize all of the blank fields?
> --
> Thank you, Jodie

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      18th Mar 2010
On Thu, 18 Mar 2010 10:08:01 -0700, Jodie <(E-Mail Removed)>
wrote:

>I need to do an update to change all blank fields to a 0 (zero). In the
>criteria, I have tried IsNull and it is not returning any of the blank
>records. I have tried IsEmpty and I get a message that say mismatch. What
>can I enter in the criteria that will recognize all of the blank fields?


Is Null

The blank is significant. IS NULL is a SQL criterion; IsNull() is a VBA
function. They are confusingly similar in both name and functionality but they
are not identical!
--

John W. Vinson [MVP]
 
Reply With Quote
 
Jodie
Guest
Posts: n/a
 
      18th Mar 2010
I thank you Karl. Apparently, I was not putting a space in between Is and
Null. It is working fine now.
--
Jodie


"KARL DEWEY" wrote:

> >>What can I enter in the criteria that will recognize all of the blank fields?

> There are more than one thing that can appear as a blank. There are nulls
> and zero lenght strings.
> Use this to pull both --
> Is Null OR ""
> That is two double quotes.
>
> --
> Build a little, test a little.
>
>
> "Jodie" wrote:
>
> > I need to do an update to change all blank fields to a 0 (zero). In the
> > criteria, I have tried IsNull and it is not returning any of the blank
> > records. I have tried IsEmpty and I get a message that say mismatch. What
> > can I enter in the criteria that will recognize all of the blank fields?
> > --
> > Thank you, Jodie

 
Reply With Quote
 
Abki
Guest
Posts: n/a
 
      20th Mar 2010
Doubble qoutes, null or space are all diffrent.
Double qoutes means the field have data with binary zero. (asci x'00')
Space means field have data as space not binary zero but code X'20' in asci.
Nulls is not represented in data field. Its indicated that field isnt
initiated.

"KARL DEWEY" skrev:

> >>What can I enter in the criteria that will recognize all of the blank fields?

> There are more than one thing that can appear as a blank. There are nulls
> and zero lenght strings.
> Use this to pull both --
> Is Null OR ""
> That is two double quotes.
>
> --
> Build a little, test a little.
>
>
> "Jodie" wrote:
>
> > I need to do an update to change all blank fields to a 0 (zero). In the
> > criteria, I have tried IsNull and it is not returning any of the blank
> > records. I have tried IsEmpty and I get a message that say mismatch. What
> > can I enter in the criteria that will recognize all of the blank fields?
> > --
> > Thank you, Jodie

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      20th Mar 2010
On Sat, 20 Mar 2010 08:07:01 -0700, Abki <(E-Mail Removed)>
wrote:

>Doubble qoutes, null or space are all diffrent.
>Double qoutes means the field have data with binary zero. (asci x'00')
>Space means field have data as space not binary zero but code X'20' in asci.
>Nulls is not represented in data field. Its indicated that field isnt
>initiated.


You're correct about NULL but mistaken otherwise. A text value of "" is an
empty string - a String of zero length. It does not contain a binary zero; and
(unless you go to a good bit of effort) Access will trim trailing blanks, so
you cannot store an x'20' alone in a table field. It will be truncated to an
empty string "" if the field's Allow Zero Length property is true, and to NULL
if it isn't.
--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumproduct copying blanks or how to insert zero into blanks =?Utf-8?B?YXNnMjMwNw==?= Microsoft Excel Worksheet Functions 4 4th Apr 2007 07:26 PM
copy range of cells with blanks then paste without blanks =?Utf-8?B?anVzdGFndXlmcm9ta3k=?= Microsoft Excel Programming 5 3rd Sep 2006 11:23 PM
copy range of cells with blanks then paste without blanks =?Utf-8?B?anVzdGFndXlmcm9ta3k=?= Microsoft Excel Worksheet Functions 1 3rd Sep 2006 07:56 PM
Adding 'Blanks' & 'Non-blanks' to a filter combo box Robin Microsoft Access VBA Modules 2 2nd Aug 2006 05:48 PM
Paste Special Skip Blanks not skipping blanks, but overwriting... =?Utf-8?B?Z3Nyb3Npbg==?= Microsoft Excel Misc 0 22nd Feb 2005 03:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:13 AM.