[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 numeric argument
- Subject: Re: Help with (SQR 4027) Function or operator '!=' requires a numeric argument
- From: richard.mitchell@GSA.GOV
- Date: Wed, 19 Jul 2000 08:50:06 -0700
Joe,
Just a hunch - Your code
BEGIN-PROCEDURE Special-SUI-Calc
> if (&PBA.TAX_CLASS = 'S' and &PBA.STATE <> '$U')
...
may be compiling as if(true and false) thus SQR does not know what kind of
variable you want.
Regardless of which other list suggestion you take, try putting an extra
set of parenthesis to separate the terms to be evaluated like
BEGIN-PROCEDURE Special-SUI-Calc
> if ((&PBA.TAX_CLASS = 'S') and (&PBA.STATE <> '$U'))
...
hth,
Rick
"Arjan Hoornstra" <ahoor@YAHOO.COM>@list.iex.net> on 07/19/2000 04:11:14 AM
Please respond to sqr-users@list.iex.net
Sent by: "Discussion of SQR, Brio Technology's database reporting
language" <SQR-USERS@list.iex.net>
To: SQR-USERS@list.iex.net
cc:
Subject: Re: Help with (SQR 4027) Function or operator '!=' requires a
numeric argument
Joe,
A few things are missing in your question:
- what is the datatype of the variable &PBA.STATE
If that is numeric, then the error is right...
- do you need the value '$U' or do you mean a string
variable $U, and what is it filled with?
- you can also try to use != instead of <>
Arjan
--- Joe Johnson <jej1216@HOTMAIL.COM> wrote:
> 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
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail ? Free email you can access from anywhere!
http://mail.yahoo.com/