[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Help with (SQR 4027) Function or operator '!=' requires a num eric argument
- Subject: Re: Help with (SQR 4027) Function or operator '!=' requires a num eric argument
- From: "Lynds,Rick" <rlynds@MWD.DST.CA.US>
- Date: Tue, 18 Jul 2000 15:37:33 -0700
Check the database definition of &PBA.STATE - make sure that it is not
defined as a numeric value. If that is OK, then try adding parentheses
around the subexpressions in the IF ... AND ... -- so that they look like IF
(...) AND (...) -- Worst case, try making the statement one line (so that
the AND does not start the new line).
HTH
Rick
-----Original Message-----
From: Joe Johnson [mailto:jej1216@HOTMAIL.COM]
Sent: Tuesday, July 18, 2000 3:03 PM
To: SQR-USERS@list.iex.net
Subject: Help with (SQR 4027) Function or operator '!=' requires a
numeric argument
First of all, my apologies for this lengthy message.
I am working with this code:
begin-procedure Evaluate-Charge-Type
begin-select
blah blah blah
evaluate &PBA.Z_CHARGE_TYPE
when = 'EMT'
add &PBA.Z_TID_COST to #er_taxes
let #prod_er_taxes = #prod_er_taxes + &PBA.Z_TID_COST
break
when = 'WC'
add &PBA.Z_TID_COST to #wc_cost
let #prod_wc_cost = #prod_wc_cost + &PBA.Z_TID_COST
break
when = 'SUI'
add &PBA.Z_TID_COST to #sui_cost
let #prod_sui_cost = #prod_sui_cost + &PBA.Z_TID_COST
break
when-other
break
end-evaluate
blah blah blah
end-select
end-procedure
The user needs to have the program evaluate two other variables when
&PBA.Z_CHARGE_TYPE = 'EMT'.
I tried this change:
when = 'EMT'
do Special-SUI-Calc
break
and then putting the other considerations in a Special-SUI-Calc Procedure:
BEGIN-PROCEDURE Special-SUI-Calc
if (&PBA.TAX_CLASS = 'S'
and &PBA.STATE <> '$U')
add &PBA.Z_TID_COST to #sui_cost
let #prod_sui_cost = #prod_sui_cost + &PBA.Z_TID_COST
else
add &PBA.Z_TID_COST to #er_taxes
let #prod_er_taxes = #prod_er_taxes + &PBA.Z_TID_COST
end-if
END-PROCEDURE !Special-SUI-Calc
When I run this, I get an error message:
(SQR 4027) Function or operator '!=' requires a numeric argument.
When I just use
if &PBA.TAX_CLASS = 'S'
in the Special-SUI-Calc Procedure, I get no errors -- but this does not meet
my user's needs.
Why does the SQR expect a numeric argument for
if (&PBA.TAX_CLASS = 'S'
and &PBA.STATE <> '$U')
?
Thanks in Advance.
Joe Johnson
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com