SQL Help

P

Paul M

Hi
I am trying to select work for sale by filtering out "Sold" from a field
using the following query string and sql but I get a no records found
The idea is that if the available field is empty it will display
I am using an access database
Thanks
Paul M

http://www.paulcmilner.co.uk/art/for_sale.asp?search=Sold


strSQL = "SELECT image_number, image_name, image_desc, gallery_status,
available " _
& "FROM tblart " _
& "WHERE available <> 'Sold' " _
& "ORDER BY image_number DESC;"
 
B

Bob Lehmann

Your empty columns probably have NULL values.

Try WHERE isnull(available, '') <> 'Sold'

Bob Lehmann
 
P

Paul M

Thanks Bob
I played around with it and found that "WHERE isnull(available)" _
worked for me
Thanks for the "isnull" tutorial another thing learned
Paul M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top