Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id C3A772E0D10 for ; Tue, 27 Nov 2007 22:04:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 19974-05 for ; Tue, 27 Nov 2007 22:04:38 -0400 (AST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by postgresql.org (Postfix) with ESMTP id D89F62E0035 for ; Tue, 27 Nov 2007 22:04:48 -0400 (AST) Received: by wa-out-1112.google.com with SMTP id m38so1720898waf for ; Tue, 27 Nov 2007 18:04:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=ZINEL+XSIfJTFNrSI0QbdyyG9EcRo4WoOiD8zI5sZ4Q=; b=blK7aE2lvKaqDpt62P5q22p6LyFHmLzqmgSrJEuoXKzBy8O6z7KqOiw0jdb9Ic2mkx0lIW6t0S1WvkMU7aaUubm7D7xdAzgCYZm/Ej0uTyww4AMdH/aGYgbyAHQHzNEjrR+wUI/zkRxVT9om8D8Sts8VrfxYZomyNveqCxmMz5s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:mime-version:content-type; b=r2anPfPyHDWymmlPGXPOIEGYFuBtDX6XkUp04qyqgEwjUh/mfRBWGoXSRK2e+p/kqsFL6hkzVO4ZJ2e14XeoYLD9trr4G+H+BZccNYRn+8I2e0TQnn3V/PsqjyRwd/8fA9/KMejfFAqJTj+UQ8zJLB/NcGVLuYz756H0GXFRR/0= Received: by 10.114.175.16 with SMTP id x16mr564324wae.1196215487367; Tue, 27 Nov 2007 18:04:47 -0800 (PST) Received: by 10.115.47.16 with HTTP; Tue, 27 Nov 2007 18:04:47 -0800 (PST) Message-ID: <474404120711271804y21b8e0b3j7f4b3771c088a82a@mail.gmail.com> Date: Wed, 28 Nov 2007 10:04:47 +0800 From: "Gera Mel Handumon" To: pgsql-sql@postgresql.org Subject: NULLIF problem MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1395_2803498.1196215487359" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/138 X-Sequence-Number: 29666 ------=_Part_1395_2803498.1196215487359 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_1395_2803498.1196215487359 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_1395_2803498.1196215487359--