Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

WHERE IsNull([Field]) or WHERE [Field] Is Null?

Posted on 2004-09-01
4
Medium Priority
?
411 Views
Last Modified: 2006-11-17
OK folks,

bit of a techie question here. The question (and hence answer) will be of no practical value but I'm curious as to your thoughts. Incidentally, it was triggered by the question 'SQL Query Numeric Field Null Value' below...

Take a very simple query...

SELECT * FROM [Table] WHERE [Field] Is Null

Is this the quickest way of running it, or would WHERE IsNull([Field]) be quicker?

My personal thinking is that SQL runs within Access as a set of compiled functions, with the Is (as in Is Null) operator being a standard part. The function IsNull() must presumably be called from within whatever set of functions Access uses to process SQL, thereby making it (fractionally) slower. However, I am far from convinced that this is correct. To bump this up to the full 500 points, can anybody give me a detailed explanation of how Access processes SQL? i.e. are SELECT, INSERT and so on effectively pointers to built in functions; is there a whole layer of interpretation / optimisation to get through first or is there some other process entirely going on?

Just curious...

Cheers,

s46.
0
Comment
Question by:solution46
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 11956182
Since "Is Null" is a native Jet operator whereas IsNull() is a VBA function, Is Null will always be faster as you don't have the overhead of passing the value through to the VBA engine.

SQL queries are processed by the Jet engine, not Access, which is essentially a shell. There are a bunch of optimisations that Access makes to the query path, and MS's patented (i.e. bought) Rushmore technology. Let me see if I can dig out an on-line reference for you. The Jet Programmer Guide would give you more information though.
0
 
LVL 9

Author Comment

by:solution46
ID: 11956232
Ahhh.. bloody obvious about IsNull() really.

By Access, I really meant Jet, as in the part that does the work! Where can I get hold of the Jet Programmer's Guide? Is that a M$ publication or third party?

s46.

0
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 2000 total points
ID: 11956296
It's a Micro$oft publication:
http://www.amazon.co.uk/exec/obidos/ASIN/1572313420/qid=1094063257/ref=sr_8_xs_ap_i1_xgl/026-7399276-4787624

That should be for Jet 3.5 - not sure if there is an updated version for Jet 4.
0
 
LVL 9

Author Comment

by:solution46
ID: 11956367
Many thanks - I'll see if I can find a copy lying round a bookshop.

The (hopefully 500) points are now yours.

s46.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question