pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joseph Shraibman <jks@p1.selectacast.net>
To: pgsql-interfaces@postgreSQL.org <pgsql-interfaces@postgreSQL.org>
Subject: selectecting not null varchars.
Date: Thu, 24 Feb 2000 14:46:54 -0500
Message-ID: <38B58AAE.B28DD6CB@selectacast.net> (raw)

I have a table with some text strings and I want to select row where the
text fields have a value in them.

I tried  :
select * from directory where length(h) > 0 ;
and got:
ERROR:  Null input to textlen

So I tried:
select * from directory where h != null AND length(h) > 0 ;
and got:
ERROR:  parser: parse error at or near "and"

In fact this:
 select * from directory where h != null  ;
... gets you this:
ERROR:  parser: parse error at or near ";"

Trying to select where it is equal to null works.  Trying to select
where an int is not equal to a certain value works.  But I cannot select
where a varchar (or int) is not equal to null.




view thread (7+ messages)  latest in thread

Message-ID: <38B58AAE.B28DD6CB@selectacast.net>
Permalink:  ../38B58AAE.B28DD6CB@selectacast.net/
Also on:    postgresql.org/message-id/38B58AAE.B28DD6CB@selectacast.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: jks@p1.selectacast.net
  Subject: Re: selectecting not null varchars.
  In-Reply-To: <38B58AAE.B28DD6CB@selectacast.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox