[Sussex] Postgresql date fields

Ronan Chilvers ronan at thelittledot.com
Thu Oct 27 11:04:03 UTC 2005


Perfick!  Thanks all!

SELECT * FROM table WHERE field IS NULL

did the job! For the record

SELECT * FROM table WHERE field = ''

Results in a data type error - Postgres 7.4.8 on Linux.  I was
tinkering about trying to get IsNull() to work - a VERY bad Access 2000
habit!!  I'm over it now...

Ta very much!

Ronan

On Thu, 27 Oct 2005 11:36:55 +0100
"Angelo Servini" <Angelo.Servini at claybrook.co.uk> wrote:

> Hi Ronan
> 
> I dont really know PostGres that much, but in other SQL's 
> 
> 	Select * from MyTablename where MyDateField is NULL
> 
> or you could use:
> 
> 	Select * from MyTablename where MyDateField is NOT NULL
> 
> where you want non empty fields.
> 
> would do the trick.
> 
> However, it may be like ORACLE where NULL values are treated as empty
> string, so
> 
> 	Select * from MyTablename where MyDateField = ''
> 
> might work.
> 
> I hope this is of use.
> 
> 
> --
> Angelo Servini
> Programmer/Analyst
> Claybrook Computing Ltd
> Sutherland House
> Russell Way
> Crawley
> West Sussex.  RH10 1UH
> * 01293 604955
> * 01293 604099 (Fax)
> * angelo.servini at claybrook.co.uk
> 
> 
> 
> 
> The above information is confidential to the addressee and may be
> privileged.  Unauthorised access and use is prohibited. If you
> received this message in error please tell us by reply (or telephone
> the sender) and delete all copies from your system.
> 
> Internet communications are not secure and therefore this Company
> does not accept legal responsibility for the contents of this
> message. This e-mail message has been swept for the presence of
> detectable computer viruses, but we cannot guarantee that it is
> virus-free and you should scan this email for viruses prior to
> opening or saving any attachments.
> 
> If you are not the intended recipient, any disclosure, copying,
> distribution or any action taken or omitted to be taken in reliance
> on it, is prohibited and may be unlawful.
> 
> Please note that communications sent by or to any person through our
> system administrator.
> 
> Claybrook Computing Limited (Registered in England and Wales No
> 1287205) is a subsidiary of Claybrook Computing (Holdings) Limited
> Registered Office: Sutherland House, Russell Way, Crawley, West
> Sussex RH10 1UH
> 
> A Xafinity Limited Company
> 
> 
> _______________________________________________
> Sussex mailing list
> Sussex at mailman.lug.org.uk
> Sussex LUG Website: http://www.sussex.lug.org.uk/
> http://mailman.lug.org.uk/mailman/listinfo/sussex
> 


-- 
Ronan
e: ronan at thelittledot.com
t: 01903 739 997
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.lug.org.uk/pipermail/sussex/attachments/20051027/b20a1f9a/attachment.pgp 


More information about the Sussex mailing list