Re: Alias name from subquery

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Alias name from subquery
Date: 2008-09-30 15:23:55
Message-ID: 20080930152355.GO7271@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Sep 30, 2008 at 03:21:53PM +0200, Felix Homann wrote:
> I would like to set an alias name for a column from a subquery, i.e.
> something like this:
>
> SELECT entry AS (SELECT name from colnames WHERE id=1) from entries ;
>
> Obviously it doesn't work _this_ way, but is there _any_ way to do it?

Generate the SQL correctly in the first place? :)

I think you may be trying to solve the wrong problem, what are you
really trying to do?

Sam

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-09-30 16:10:32 Re: Alias name from subquery
Previous Message Felix Homann 2008-09-30 14:42:05 Re: Alias name from subquery