Re: Converting yes or no to one letter strings.

From: "Ray O'Donnell" <ray(at)rodonnell(dot)ie>
To: Lou <lou(at)dayspringpublisher(dot)com>, <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Converting yes or no to one letter strings.
Date: 2019-06-04 23:03:06
Message-ID: 16b24bb5810.280a.f9dd809031fc0469edf0bbbf79c1d468@rodonnell.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4 June 2019 23:30:33 Lou <lou(at)dayspringpublisher(dot)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;

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2019-06-04 23:23:32 Re: Converting yes or no to one letter strings.
Previous Message Rich Shepard 2019-06-04 23:01:11 Re: Converting yes or no to one letter strings.