Knowledgebase
[QODBC-Desktop] Troubleshooting - How to select record when value is null
Posted by Jack - QODBC Support on 23 March 2015 01:43 PM

Troubleshooting - How to select record when value is null

Problem Description:

I am trying to run a report which returns ItemInventory where LastReceived is NULL I have tried in vain to accomplish this. My question is what syntax do you use to select a blank/null date or is there a special function for this?

Solution:

You can select blank/null date by using "IS NULL" in your query.

For Example below query will returns row whose InventoryDate is blank or null:

SELECT * FROM ItemInventory where InventoryDate IS NULL

http://support.flexquarters.com/esupport/newimages/ISNULL/step1.png


The same way you can use "IS NOT NULL" in your query.

For Example below query will returns row whose InventoryDate is not blank or null:

SELECT * FROM ItemInventory where InventoryDate IS NOT NULL
 

http://support.flexquarters.com/esupport/newimages/ISNULL/step2.png

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).