Re: Convert boolean field to a 0 or a 1 in a select statement
От
Sameer Kumar
Тема
Re: Convert boolean field to a 0 or a 1 in a select statement
Дата
Msg-id
CADp-Sm7UjpUSV9JHjhwwOy1dp0ETsWqstKaPvikc6Mriuy3UwA@mail.gmail.com
Ответ на
Convert boolean field to a 0 or a 1 in a select statement (JORGE MALDONADO)
Список
Дерево обсуждения
Convert boolean field to a 0 or a 1 in a select statement JORGE MALDONADO <jorgemal1960@gmail.com>
Re: Convert boolean field to a 0 or a 1 in a select statement David G Johnston <david.g.johnston@gmail.com>
Re: Convert boolean field to a 0 or a 1 in a select statement Steve Crawford <scrawford@pinpointresearch.com>
Re: Convert boolean field to a 0 or a 1 in a select statement Sameer Kumar <sameer.kumar@ashnik.com>
Re: Convert boolean field to a 0 or a 1 in a select statement "Zelaznik, Steve" <szelazni@AEGONUSA.com>
Re: Convert boolean field to a 0 or a 1 in a select statement Sameer Kumar <sameer.kumar@ashnik.com>
On Sat, Jan 10, 2015 at 12:47 AM, JORGE MALDONADO <jorgemal1960@gmail.com> wrote:
CAST(fce_subdivision as CHAR) AS fce_subdivision_aux,CASE CAST(fce_subdivision as CHAR)WHEN 'f' THEN '0'WHEN 't' THEN '1'END
Why do you want to cast it first to char?
And anyways what is the issue with casting it to number first and then casting it to char?
Best Regards,
Sameer Kumar | Database Consultant
ASHNIK PTE. LTD.
101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533
M: +65 8110 0350 T: +65 6438 3504 | www.ashnik.com
This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s).
В списке pgsql-novice по дате отправления
От: Zelaznik, Steve
Дата: