pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ray O'Donnell <ray@rodonnell.ie>
To: Lou <lou@dayspringpublisher.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Converting yes or no to one letter strings.
Date: Wed, 05 Jun 2019 00:03:06 +0100
Message-ID: <16b24bb5810.280a.f9dd809031fc0469edf0bbbf79c1d468@rodonnell.ie> (raw)
In-Reply-To: <555b017e-2449-43a4-19e6-4c19af6017e3@dayspringpublisher.com>
References: <555b017e-2449-43a4-19e6-4c19af6017e3@dayspringpublisher.com>



On 4 June 2019 23:30:33 Lou <lou@dayspringpublisher.com> wrote:
> Hi everyone,
> Is it possible to convert a boolean yes or no field to hold a one letter 
> string? For example, the strings: 's' 'f' 'p' 'e'
> To start off, I just need to convert true to 's'. false will have to be 
> manually changed to 'f' or 'p' or 'e' as appropriate.
> Lou
select case when (boolean variable) then (whatever) else (whatever else) end;

view thread (10+ messages)  latest in thread

Message-ID: <16b24bb5810.280a.f9dd809031fc0469edf0bbbf79c1d468@rodonnell.ie>
Permalink:  ../16b24bb5810.280a.f9dd809031fc0469edf0bbbf79c1d468@rodonnell.ie/
Also on:    postgresql.org/message-id/16b24bb5810.280a.f9dd809031fc0469edf0bbbf79c1d468@rodonnell.ie

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ray@rodonnell.ie, lou@dayspringpublisher.com
  Subject: Re: Converting yes or no to one letter strings.
  In-Reply-To: <16b24bb5810.280a.f9dd809031fc0469edf0bbbf79c1d468@rodonnell.ie>
  References: <555b017e-2449-43a4-19e6-4c19af6017e3@dayspringpublisher.com> <16b24bb5810.280a.f9dd809031fc0469edf0bbbf79c1d468@rodonnell.ie>

* 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