This content has been marked as final. Show 7 replies
How about you try this
Select -1 AS QTE from dual
and in your column definition remove the type=number
i mean just put source=SQLCOL sqlcol=QTE label='QTE' and check if it works the way you wanted.
Thanks for the idea but it doesn't work either...
try to chage type to STRING
I did a quick check, by not putting any type in the column . It seems to be displaying -1 correctly
May be something related to your user profile display? or something else that your SQL is trying to do, i imagine your SQL is not as simple as "SELECT -1 FROM DUAL"
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<'