Analysis

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Parser
  • Assigned To
    Torsten Bonde Christiansen
  • Operating System All
  • Severity High
  • Priority High
  • Reported Version 2.0
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Analysis
Opened by Jens Lauritsen - 07.02.2019
Last edited by Torsten Bonde Christiansen - 13.04.2019

FS#197 - error in combined parsing of addition

.select fald = 1 do fald := fald[_n] + (pos(proc[_n],"ZZ57007B1") > 0); ERROR: Right Expression return type must be integer, date, float, time or string

.select fald = 1 do fald := (fald[_n]) + (pos(proc[_n],"ZZ57007B1") > 0);

ERROR: Right Expression return type must be integer, date, float, time or string

.select fald = 1 do fald := (fald[_n]) + ((pos(proc[_n],"ZZ57007B1") > 0));

ERROR: Right Expression return type must be integer, date, float, time or string

This is wrong since the right side is either 0 or 1 puls the result of a "logical test".

Closed by  Torsten Bonde Christiansen
13.04.2019 10:45
Reason for closing:  Not a bug
Admin
Torsten Bonde Christiansen commented on 09.04.2019 21:20

Missing datafile to recreate error.

Admin
Torsten Bonde Christiansen commented on 13.04.2019 10:45

No, the error here is that the expression "(pos(proc[_n],"ZZ57007B1") > 0)" and can ONLY return True/False. And we cannot do addition on boolean value!

You should first cast the result to integer (or string if you like) to get the desired output.

Eg:
select fald = 1 do fald := fald[_n] + (integer(pos(proc[_n],"ZZ57007B1") > 0));

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing