From: George Handin <postgresql@dafunks.com>
To: pgsql-sql@postgresql.org
Subject: Query to return modified results at runtime?
Date: Wed, 07 Jun 2006 19:29:23 -0500
Message-ID: <44876F63.9030302@dafunks.com> (raw)
I have a query:
SELECT * FROM testtable;
Where the results are:
ID Color
--- -------
1 Blue
2 Red
3 Green
4 Orange
How would I rewrite the query to return results where the colors are
replaced by letters to give the following results?
ID Color
--- -------
1 A
2 D
3 B
4 C
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: postgresql@dafunks.com
Subject: Re: Query to return modified results at runtime?
In-Reply-To: <44876F63.9030302@dafunks.com>
* 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