Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for Null value in DB2
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00552608
Message ID:
00552672
Vues:
12
This message has been marked as the solution to the initial question of the thread.
>I am using embedded SQL statements in Visual Basic 6 to query data from a DB2 database. The field I am trying to check and see if it's value is Null is Cancel_date, it is a date/time field.
>I don't know how to write the Select statement so that it checks if it's value is Null. I tried:
>
>SELECT * FROM TableName WHERE CANC_DT = NULL
>SELECT * FROM TableName WHERE CANC_DT = 'NULL'
>SELECT * FROM TableName WHERE CANC_DT = ""
>
>none of these work, does anyone know how to do this?
>thanks,
>Ryan Uhl

Normally, you use the IS operator:
SELECT * FROM TableName WHERE CANC_DT IS NULL
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform