Is it possible to have a Nested Select in SQL Explorer?

Posted by Admin on 14-May-2009 07:33

Hi,

Is it possible to have a nested select statement in SQL Explorer like the one below?

SELECT accperiod, (select sum(transvalue) from pub.trans where accperiod = 200206) as AC1, (select sum(transvalue) from pub.trans where accperiod = 200207) as AC2, ((AC2 - AC1)/AC2 * 100) as Var
FROM pub.transactions where accperiod = 200607;

I get the following error when I run this.

=== SQL Exception 1 ===
SQLState=42000
ErrorCode=-20003
[JDBC Progress Driver]:Syntax error (7587)

All Replies

This thread is closed