Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: Executing d...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 15438 of 17602
Post > Topic >>

Re: Executing dynamic procedure call

by craig@[EMAIL PROTECTED] (Craig Ringer) May 4, 2008 at 02:27 AM

tekwiz wrote:

> Result:
> 
> DBD::Pg:st execute failed: ERROR: operator does not exist: money <>
> integer
> HINT: No operator matches the given name and argument type(s). You may
> need to add explicit type casts.
> CONTEXT: SQL statement "SELECT (( $1 - $2 - $3 - $4 - $%) <> 0)"

craig=# SELECT '0'::money <> 0;
ERROR:  operator does not exist: money <> integer
LINE 1: SELECT '0'::money <> 0;
                           ^
HINT:  No operator matches the given name and argument type(s). You 
might need to add explicit type casts.


You are trying to compare a value of `money' data type with a value of 
`integer' data type. This is intentionally not permitted. Since, in your 
case, it looks like the 0 is an integer literal you should be doing:

( moneyvar1 - moneyvar2 - moneyvar3etc ) <> '0'::money;

In the longer run you might want to look into using the NUMERIC data 
type instead of the MONEY type.

--
Craig Ringer

-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 2 Posts in Topic:
Executing dynamic procedure call
tekwiz <ryoung@[EMAIL   2008-05-02 07:25:12 
Re: Executing dynamic procedure call
craig@[EMAIL PROTECTED]   2008-05-04 02:27:54 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 19:28:49 CST 2008.