Re: Converting yes or no to one letter strings. - Mailing list pgsql-general

From Ray O'Donnell
Subject Re: Converting yes or no to one letter strings.
Date
Msg-id 16b24bb5810.280a.f9dd809031fc0469edf0bbbf79c1d468@rodonnell.ie
Whole thread Raw
In response to Converting yes or no to one letter strings.  (Lou <lou@dayspringpublisher.com>)
List pgsql-general


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;

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Converting yes or no to one letter strings.
Next
From: "David G. Johnston"
Date:
Subject: Re: Converting yes or no to one letter strings.