pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Schmitz <andreas.schmitz@as-dataservice.de>
To: Terry Yapt <pgsql@technovell.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: COALESCE in ORDER BY...
Date: Sat, 17 May 2003 19:14:09 +0200
Message-ID: <3EC66DE1.1090705@as-dataservice.de> (raw)
In-Reply-To: <1053189601.81a4c98pgsql@technovell.com>
References: <1053189601.81a4c98pgsql@technovell.com>

Terry Yapt wrote:

>www=> SELECT 10 AS first ORDER BY COALESCE(first,0) DESC;
>ERROR:  Attribute "first" not found
>
>Thanks in advance..
>  
>
Perhaps, this is a bug, but I have a workarround for you till this is 
clariefied:

SELECT *
FROM (SELECT 10 AS FIRST) AS vtbl
ORDER BY COALESCE(vtbl.first,0) DESC;

(Tested with 7.3.2)

Best regards
-- 
Andreas Schmitz
AS-DataService <http://www.as-dataservice.de;
Kastanienallee 24
D-54662 Speicher

Tel.: (0 65 62) 93 05 17
Fax: (0 65 62) 93 05 18
Email: andreas.schmitz@as-dataservice.de 
<mailto:andreas.schmitz@as-dataservice.de>

Ust-IdNr.: DE211466407
Handelsregister: HRA 1869 - Amtsgericht Bitburg
<http://www.as-dataservice.de;

 




view thread (4+ messages)  latest in thread

Message-ID: <3EC66DE1.1090705@as-dataservice.de>
Permalink:  ../3EC66DE1.1090705@as-dataservice.de/
Also on:    postgresql.org/message-id/3EC66DE1.1090705@as-dataservice.de

 · 

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-sql@postgresql.org
  Cc: andreas.schmitz@as-dataservice.de, pgsql@technovell.com
  Subject: Re: COALESCE in ORDER BY...
  In-Reply-To: <3EC66DE1.1090705@as-dataservice.de>

* 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