Sql macro is not working properly in convluence v2.6.0 which is under JBoss App server where as the same is working with confluence v2.5.4 / v2.5.6.
Where as the version of confluence v2.6.0 under Tomcat 5.5 is working perfectly without any issues. The only problem is with v2.6.0 under JBoss.
Example query:
{sql:datasource=ConfluenceDS}
SELECT SPACENAME, 'syed' as NAME FROM SPACES;{sql}
And the exception it throws is as follow:
sql: Unexpected program error: java.sql.SQLException: Column '' not found.
SELECT SPACENAME, 'syed' as NAME FROM SPACES;
I was able to narrow the issue to the use of 'as x'. In other words, 'select name from foo' would work where 'select name as MyName from foo' would not.
One exception I did find: I am able to 'select localtime(sample_date) as Date' without problems.
I hope this helps.