Received: from Alex2.cte.Dal.Ca (Alex2.cte.Dal.Ca [134.190.17.62]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eA1F0Gl61281 for ; Wed, 1 Nov 2000 10:00:16 -0500 (EST) (envelope-from CTE@Dal.Ca) Received: from ghost (Ghost.cte.Dal.Ca [134.190.17.89]) by Alex2.cte.Dal.Ca (8.9.3/8.9.3) with SMTP id LAA14981; Wed, 1 Nov 2000 11:15:49 -0400 Message-ID: <00a001c04414$997fd420$5911be86@cte.Dal.Ca> From: "Continuing Technical Education" To: "George Henry C. Daswani" Cc: "Pgsql-sql" References: <006e01c04384$e4bb2d30$ee25012e@narn> Subject: Re: Problem with coalesce.. Date: Wed, 1 Nov 2000 11:01:22 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_009D_01C043F3.123BD980" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200011/6 X-Sequence-Number: 37 This is a multi-part message in MIME format. ------=_NextPart_000_009D_01C043F3.123BD980 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Try: SELECT COALESCE(CURVALUE,1) FROM TABLEKEYS WHERE TABLENAME =3D 'BUYER'; ----- Original Message -----=20 From: George Henry C. Daswani=20 To: pgsql-sql@postgresql.org=20 Cc: pgsql-general@postgresql.org=20 Sent: Tuesday, October 31, 2000 5:52 PM Subject: [SQL] Problem with coalesce.. Hello, Was wondering if such a call is unsupported, or a bug? 7.0.2 (postgresql, linux redhat 7.0) SELECT COALESCE ((SELECT NULL,1)=20 returns a 1, correct.. however.. SELECT COALESCE ((SELECT CURVALUE FROM TABLEKEYS WHERE TABLENAME =3D 'BUY= ER'),1) returns a "UNKNOWN expression type 501" SELECT CURVALUE FROM TABLEKEYS WHERE TABLENAME =3D 'BUYER'; returns a '0' Thanks.. George ------=_NextPart_000_009D_01C043F3.123BD980 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Try:
 
SELECT COALESCE(CURVALUE,1) FROM TABLEKEYS= WHERE=20 TABLENAME =3D 'BUYER';
 
----- Original Message -----
Fro= m:=20 George Hen= ry C.=20 Daswani
To: pgsql-sql@postgresql.org
Sent: Tuesday, October 31, 2000 5:= 52=20 PM
Subject: [SQL] Problem with=20 coalesce..

Hello,
 
    Was wondering if such= a call=20 is unsupported, or a bug?
 
7.0.2 (postgresql, linux redhat 7.0)
 
SELECT COALESCE ((SELECT NULL,1) =
 
returns a 1, correct..
 
however..
 
SELECT COALESCE ((SELECT CURVALUE FROM T= ABLEKEYS=20 WHERE TABLENAME =3D 'BUYER'),1)
 
returns a "UNKNOWN expression type=20 501"
 
SELECT CURVALUE FROM TABLEKEYS WHERE TAB= LENAME =3D=20 'BUYER'; returns a '0'
 
Thanks..
 
George
 
 
------=_NextPart_000_009D_01C043F3.123BD980--