Jason30 Posted April 26, 2017 Share Posted April 26, 2017 Hi all, I receive the following error: column "Code" does not exists. [/code] (SELECT value FROM table WHERE id = $P{order_id}) as Code, sum( case when ( Code ='ME') then Weight/1000*5 else 0 end) ME, It seems that the query doesn't recognize the subquery. Has anyone an idea what the cause is of this error? Thanks in advance for any help / insights. Link to comment Share on other sites More sharing options...
hozawa Posted April 26, 2017 Share Posted April 26, 2017 Jaspersoft Studio expression editor sometimes return an error message even when it's OK. Just ignore the message and save the expression and execute. Most of the time, this would work if your expression is actually valid. Link to comment Share on other sites More sharing options...
Jason30 Posted April 28, 2017 Author Share Posted April 28, 2017 Unfortunately it doesn't generate the query which holds the 'Code'.Because of the error the field 'ME' isn't available in the report.sum( case when ( Code ='ME') then Weight/1000*5 else 0 end) MEAny idea's?Thanks. Link to comment Share on other sites More sharing options...
Jason30 Posted May 1, 2017 Author Share Posted May 1, 2017 It doesn't recognise the alias 'CODE'.However, the alias CODE does exists and can be used in the report.But not in the query.Is there a fix for this? Or an other way to achieve it?Thanks for any help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now