Re: SQL query for NULL field entries
Posted in 1992
In article <8990@emory.mathcs.emory.edu> caulds%deh1@redstone-emh2.army.mil (Charles Aulds /AMSMI-RA-EH-RM/876-0889) writes: >What I want to do is select records where a specific field contains >no entry. The following line does NOT work, but will illustrate what >I need to do: > > select jocpbc.* from jocpbc where pbcj=" "; > >The following line also fails to return the desired rows: > > select jocpbc.* from jocpbc where pbcj=""; > >The column 'pbcj' is type character, but I need the query to work as >well for date columns. >---------------------------------------------------------------------------- >Charles Aulds | System Administrator, ><caulds@redstone-emh1.army.mil> | Redstone Arsenal Directorate >Smith Advanced Technology | of Engineering and Housing >Voice: (205)876-0889 Fax: (205)876-0412 | Redstone Arsenal, Alabama >---------------------------------------------------------------------------- if the field really contains null like you say then this should work select jocpbc.* from jocbc where pbcj is null; I'm not real sure about you astrick if your looking for a wildcard it is % in a select statement. -- Greg Porter _|_ gporter@csus.edu California State University, Sacramento | ucdavis!csusac!porterg University Telecommunications Services (UTS) | -- All opinions are my own and not of my employer --