RE: sql select
Posted in 2000
> -----Original Message-----
> From: James Dickin [mailto:jp35@dial.pipex.com]
> Sent: 20 January 2000 10:16
> To: informix-list@iiug.org
> Subject: sql select
>
>
> I am trying to select records that have null values in a
> specific field
> using:
>
> SELECT * FROM table_name WHERE field_name IS NULL>
> the field_name is a single character field.
> This returns ' No rows found' (I know there are records with
> null values)
Are you sure that are definitely null as apposed to a space.
Try
SELECT "-->" || filed_name || "<--"
FROM table_name
--WHERE field_name IS NULL best leave the where clause out if it forces no
rows to be found.
> I also tried the above leaving out the WHERE statement and it
> only returned
> the records that had a character in the field_name and not
> those without.
> There are other records with null value fields in the same
> table and it
> selects these OK
>
> What can cause this behavior?
>
>
Jo
___________________________________________________________________________
This email is confidential and intended solely for the use of the
individual to whom it is addressed. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
Sema Group.
If you are not the intended recipient, be advised that you have received this
email in error and that any use, dissemination, forwarding, printing, or
copying of this email is strictly prohibited.
If you have received this email in error please notify the Sema Group
Helpdesk by telephone on +44 (0) 121 627 5600.
___________________________________________________________________________