ether the query
itself is correct.
Goodluck
> -Oorspronkelijk bericht-
> Van: Stephane Schildknecht [mailto:[EMAIL PROTECTED]]
> Verzonden: vrijdag 5 juli 2002 15:39
> Aan: Arjen van der Meijden
> CC: [EMAIL PROTECTED]
> Onderwerp: Re: [SQL] Boolean to int
>
>
>
Le jeu 04/07/2002 à 23:32, Arjen van der Meijden a écrit :
> How about this hint in the postgresql-manual:
>
>"Tip: Values of the boolean type cannot be cast directly to other
> types (e.g., CAST (boolval AS integer) does not work). This can be
> accomplished using the CASE expression: CAS
On 4 Jul 2002, Stephane Schildknecht wrote:
> CREATE RULE boolean_return AS ON SELECT TO DOCUMENT DO INSTEAD
> SELECT
> document_id,
> workflow_id,
> type_document_id,
> image_id,
> theme_id,
> document_version,
> document_surtitre,
Hi,
I'd like to get 1 or 0 from a select on a boolean field.
How could I do ?
I tried the following rule, which I can't insert :
CREATE FUNCTION bool_to_int( boolean ) RETURNS integer AS '
DECLARE
my_bool ALIAS FOR $1 ;
BEGIN
-- Retourn