Pavel Konovalov wrote:

> Hello, All!
> Server - SAP DB 7.3.0.23 Linux RedHat 7.1
> 
> Client - SQL Studio 7.4 or ODBC Application on Windows 2000 SP2
> 
> I have a table of the type:
> 
> create table flat_prd
> 
> (
> name varchar(20),
> s_use float,
> s_kuh float
> )
> 
> I necessary to select  from table on condition with expression:
> 
> select * from flat_prd where s_use/s_kuh = 2
> 
> herewith appears mistake "General error;-3024 POS(1) Invalid numeric
> expression."
> 
> But requests of the next:
> 
> select * from flat_prd where s_use+s_kuh = 2
> 
> select * from flat_prd where s_use-s_kuh = 2
> 
> select * from flat_prd where s_use*s_kuh = 2
> 
> select * from flat_prd where s_use/2 = s_kuh
> 
> they are executed orderly.
> 
> Why?

Short answer: 
because at least one s_kuh-value is 0.
And   xyz / 0 will always return an error, whereas xyz + 0 or something like
this is no problem,
no matter if SAP DB or a normal calculator is used.

But this explanation could have been found by yourself in our document
Mesaages SAP DB 7.2.and 7.3, where is written:

-3024: Invalid numeric expression 

Explanation:

It was intended to perform a division by 0. 

This division does not belong to a SELECT COLUMN of the outermost QUERY SPEC
statement.

User Action:

Check whether this error can be prevented by suitable specifications
(PREDICATEs).


Elke
SAP Labs Berlin
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to