pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Phillip Smith <phillip.smith@weatherbeeta.com.au>
To: 'Ezequias Rodrigues da Rocha' <ezequias.rocha@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Retrieving 'Credit' when 'C'
Date: Fri, 16 Feb 2007 08:47:14 +1100
Message-ID: <004001c7514a$daf02730$9b0014ac@wbaus090> (raw)
In-Reply-To: <55c095e90702150844h3159bfbbx83c71b6910f4a88f@mail.gmail.com>

SELECT      when,

CASE WHEN type = 'C' THEN 'Credit' END AS type

FROM        mytable;

 

Assuming your column names are actually "when" and "type" you should just
have to change "mytable" to the correct table name and run in psql or the
SQL Window of pgAdmin or wherever you usually run your SQL queries to get
what you want.

 

 

-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of Ezequias Rodrigues da Rocha
Sent: Friday, 16 February 2007 03:45
To: Ezequias Rodrigues da Rocha; pgsql-sql@postgresql.org
Subject: Re: [SQL] Retrieving 'Credit' when 'C'

 

Just a question, where to put it ? I didn't notice yet. 



*******************Confidentiality and Privilege Notice*******************

The material contained in this message is privileged and confidential to
the addressee.  If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.

Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments


view thread (6+ messages)  latest in thread

Message-ID: <004001c7514a$daf02730$9b0014ac@wbaus090>
Permalink:  ../004001c7514a$daf02730$9b0014ac@wbaus090/
Also on:    postgresql.org/message-id/004001c7514a$daf02730$9b0014ac@wbaus090

 · 

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: phillip.smith@weatherbeeta.com.au, ezequias.rocha@gmail.com
  Subject: Re: Retrieving 'Credit' when 'C'
  In-Reply-To: <004001c7514a$daf02730$9b0014ac@wbaus090>

* 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