This content has been marked as final. Show 7 replies
Indeed, "SELECT -1 FROM DUAL" was aimed to isolate the issue... but created an artifact :-/
, (select (-1) from dual) "QTE"
source=SQLCOL sqlcol=QTE label='QTE'
, (select (-1) from dual) "M1"
source=SQLCOL sqlcol=M1 label='M1'
I'm not sure but it might be due to a QTE md field defined as numeric unsigned...
Whatever my concern is about this : showing negative quantity when uom_cd last digit is '<'
, decode(@substr(@trim(REG.uom_cd),-1),'H','pos','neg') "QTEP"
works fine (of course only when last digit is H)
, decode(@substr(@trim(REG.uom_cd),-1),'<','neg','pos') "QTEN"
doesn't work : always 'pos', even if last digit is <
may be a stupid questions ;) did you check your SQL in SQL developer or toad to check if it gives your desired result ?
if yes, try to display a value from your zone without any formatting(like adding a type), even if that fails I can imagine it should be some sort of compatibility issue with your SQL and zone. Why not re-writing your SQL in different way.
After some additionnal test, the issue is about handling the "lower as" sign (<) by the system when used in a sql statement in a zone.
Debug logs showed in several contexts that "xyz<abc" is interpreted into "xyz < abc" : one additionnal space on the left and one on the right. Then it doesn't match with the data.
decode(@substr(@trim(REG.uom_cd),-1),' < ','neg','pos') gives 'pos' when uom_cd='KWH<'