SQL Help

  • Thread starter Thread starter Paul M
  • Start date Start date
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;"
 
Your empty columns probably have NULL values.

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

Bob Lehmann
 
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
 
Back
Top