Numeric processor operand error...

Database
l_k
Enthusiast

Numeric processor operand error...

Hi,

when i run the below query,it is throwing the error as "Numeric processor operand error" code is :2650..

Query :
=====
SELECT DISTINCT bx.upc UPCNumber FROM
(SELECT * FROM bx_vw WHERE loaddate = '2010-06-01 03:15:25' ) bx,
(SELECT * FROM Sales_Price_Bx WHERE loaddate = '2010-06-01 03:15:25') sp
WHERE( bx.reward MOD sp.unitprice) <> 0

Can anyone please help me on this? it is very urgent...

Thanks

Kumar
2 REPLIES
Enthusiast

Re: Numeric processor operand error...

1. unitprice is probably zero on one of the records.
2. You have no join condition, so if either of your subqueries returns more than one row, you are going to do a product join.
So, something like:

SELECT DISTINCT bx.upc UPCNumber FROM
(SELECT * FROM bx_vw WHERE loaddate = '2010-06-01 03:15:25' ) bx,
(SELECT * FROM Sales_Price_Bx WHERE loaddate = '2010-06-01 03:15:25'
and unitprice <> 0) sp
WHERE( bx.reward MOD sp.unitprice) <> 0
and bx.pkfields = sp.pkfields
;

(pkfields is the key to join the records - could be UPCNumber or some sort of product code.

HTH
l_k
Enthusiast

Re: Numeric processor operand error...

Hi Jimm,

Thank you very much for your reply.It's quite useful to me...