NULLIF problem

From: "Gera Mel Handumon" <geramel(dot)h(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: NULLIF problem
Date: 2007-11-28 02:04:47
Message-ID: 474404120711271804y21b8e0b3j7f4b3771c088a82a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

HELLO,

I encounter an error if i use NULLIF with timestamp with time zone.
eq. dbtime=nullif(mytime,'')

i want to null the value of field DBTIME if the variable mytime=" "

DBTIME ="timestamp with time zone" datatype

error: column DBTIME is of type timestamp with time zone but expression is
of type text.

What should i do?

Thanks in advance...

--
Gera Mel E. Handumon
Application Programmer
PaySoft Solutions, Inc.
-----------------------------------------------------------------
"Share your knowledge. It's a way to achieve immortality" - Dalai Lama

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Glaesemann 2007-11-28 02:47:36 Re: NULLIF problem
Previous Message Daniel Caune 2007-11-28 00:16:17 Strang behaviour SELECT ... LIMIT n FOR UPDATE