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

Troubleshooting - How to select a record when the value is null

Problem Description:

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

Solution:

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

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

SELECT * FROM ItemInventory where InventoryDate IS NULL

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


In the same way, you can use "IS NOT NULL" in your query.

For Example below query will return a 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).