Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: simple oracle SQL question
you may try SELECT count(*) FROM tktmaster WHERE closedate IS NULL ;IF u get no rows selected then you have no rows with closedate NULL THE right syntax is : IS NULL , IS NOT NULL and so on using 'NULL' is the same as 'BRAD' - searcing columns that contain the char 'NULL' or 'BRAD'
Brad McBride wrote in message <366BEFA7.21B12A77_at_Axom.com>...
>I hope that I am sending this to the correct place and my sincere
>apologies if I am going off of the topic. I am working on a very simple
>oracle SQL query and have been seperated from my SQL guide books (they
>are 200 miles from my present location). I have a table that stores
>information about services that are being performed. These services,
>when created, have a SYSDATE placed in a field called "opendate" and a
>NULL value placed in the field called "closedate". I am now wanting to
>retrieve a list of all services that are still open, i.e., have no
>closedate. I tried the following two commands to no avail:
>
>SELECT * FROM tktmaster WHERE closedate='NULL';
>
>and
>
>SELECT * FROM tktmaster WHERE closedate=' ';
>
>There is probably something very simple that I have forgotten but
>without my SQL reference, I'm lost. Thanks for any assistance that
>anyone may be able to provide.
>
>Brad McBride
>
Received on Mon Dec 07 1998 - 17:01:47 CST