Re: Operator to compare numeric and double precision

From: Terry Yapt <pgsql(at)technovell(dot)com>
To: Christoph Dalitz <christoph(dot)dalitz(at)hs-niederrhein(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Operator to compare numeric and double precision
Date: 2002-10-28 17:35:56
Message-ID: 3DBD757C.A713C40B@technovell.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Christoph,

I cannot use CAST in this exact example. I have _only_ be able to
change the operator in the whole expression...

I mean:

a = b (give me the error, because a=numeric and b=double precision)

I need something like (for example):
a =!= b (an _equal_ operator which support a numeric and double
precision operands).. I am inventing this '=!=' operator type...

Thanks...

Christoph Dalitz wrote:
>
> > Date: Sun, 27 Oct 2002 13:02:38 +0100
> > From: Terry Yapt <pgsql(at)technovell(dot)com>
> >
> > Are there any operator to compare numeric with double precision ?
> >
> Try the SQL-Function CAST (its part of the SQL2 standard), eg.
>
> ... WHERE doublefield = (CAST numericfield AS DOUBLE) ...
>
> I don't know whether ODBC supports SQL-Functions directly; you will
> probably need to use the "PASSTHROUGH" parameter.
>
> Hope this helps,
>
> Christoph Dalitz
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Darko Prenosil 2002-10-28 18:09:43 Re: Binary Large Objects
Previous Message snpe 2002-10-28 17:14:24 Re: 7.3b3 build --with-perl fails on RH 8.0