Re: Boolean to Integer?

Поиск
Список
Период
Сортировка
От Philip Hallstrom
Тема Re: Boolean to Integer?
Дата
Msg-id 20021017100833.I82228-100000@cypress.adhesivemedia.com
обсуждение исходный текст
Ответ на Boolean to Integer?  ("Roberto (SmartBit)" <roberto@smartbit.inf.br>)
Список pgsql-general
Search the manual for "CASE"  I can never remember the syntax, but that's
what you want... it's behaves similar to a C switch statement.

On Thu, 17 Oct 2002, Roberto (SmartBit) wrote:

> Hi all
>
> How could i transform a Boolean value in a Integer???
>
> My table field is Boolean, but I'd like that my SELECT reults an Integer
> field!!
>
> something like: SELECT  IF( FieldBoolName , 1, 0) FROM myTABLE
>
>
> tia
>
>
> Roberto de Amorim - +55 48 346-2243
> Software engineer at SmartBit Software
> Delphi and Interbase consultant
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>


В списке pgsql-general по дате отправления:

Предыдущее
От: "Roberto (SmartBit)"
Дата:
Сообщение: Boolean to Integer?
Следующее
От: pginfo
Дата:
Сообщение: Query performance with small data base