Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How to use a computed column in the where clause of the query(I have a scenario where I need to create a computed column and then use that computed column in the where clause in the main query.)
How to use a computed column in the where clause of the query [message #1773763] Wed, 04 October 2017 10:47
Vivek Rawat is currently offline Vivek RawatFriend
Messages: 1
Registered: October 2017
Junior Member
I have a scenario where I need to create a computed column and then use that computed column in the where clause in the main query.

For ex-

I have a query say

SELECT*FROM ORDERS

WHERE COMPUTED_COLUMN = ?



so how can I use like above in birt ? I am getting the following error for my computed column "ExecutionMode"

org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
at org.eclipse.birt.report.engine.api.impl.DatasetPreviewTask.doRun(DatasetPreviewTask.java:316)
at org.eclipse.birt.report.engine.api.impl.DatasetPreviewTask.runDataset(DatasetPreviewTask.java:278)
at org.eclipse.birt.report.engine.api.impl.DatasetPreviewTask.execute(DatasetPreviewTask.java:89)
at org.eclipse.birt.report.designer.data.ui.dataset.DataSetPreviewer.preview(DataSetPreviewer.java:68)
at org.eclipse.birt.report.designer.data.ui.dataset.ResultSetPreviewPage$5.run(ResultSetPreviewPage.java:372)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.eclipse.birt.report.data.adapter.api.AdapterException: An exception occurred during processing. Please see the following message for details:
Failed to prepare the query execution for the data set: Orders
Cannot get the result set metadata.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.
SQL error #1:Invalid column name 'ExecutionMode'.

SQL error #2:The cursor 'jconnect_implicit_16' can not be used as it could not be found. It is possible that either it was not declared or it is not available in the current context.

SQL error #3:There is no cursor information given with the current datstream. A cursor id of zero was specified and no name was specified. The current batch of commands is being aborted. This is an internal error.

;
com.sybase.jdbc4.jdbc.SybSQLException: Invalid column name 'ExecutionMode'.

at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:671)
at org.eclipse.birt.report.engine.api.impl.DatasetPreviewTask.extractQuery(DatasetPreviewTask.java:347)
at org.eclipse.birt.report.engine.api.impl.DatasetPreviewTask.doRun(DatasetPreviewTask.java:307)
... 5 more
Caused by: org.eclipse.birt.data.engine.core.DataException: Failed to prepare the query execution for the data set: Orders
Cannot get the result set metadata.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.
SQL error #1:Invalid column name 'ExecutionMode'.

SQL error #2:The cursor 'jconnect_implicit_16' can not be used as it could not be found. It is possible that either it was not declared or it is not available in the current context.

SQL error #3:There is no cursor information given with the current datstream. A cursor id of zero was specified and no name was specified. The current batch of commands is being aborted. This is an internal error.

;
com.sybase.jdbc4.jdbc.SybSQLException: Invalid column name 'ExecutionMode'.

at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:353)
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:463)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:179)
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:651)
... 7 more
Caused by: org.eclipse.birt.data.engine.odaconsumer.OdaDataException: Cannot get the result set metadata.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.
SQL error #1:Invalid column name 'ExecutionMode'.

SQL error #2:The cursor 'jconnect_implicit_16' can not be used as it could not be found. It is possible that either it was not declared or it is not available in the current context.

SQL error #3:There is no cursor information given with the current datstream. A cursor id of zero was specified and no name was specified. The current batch of commands is being aborted. This is an internal error.

;
com.sybase.jdbc4.jdbc.SybSQLException: Invalid column name 'ExecutionMode'.

at org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.newException(ExceptionHandler.java:52)
at org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.throwException(ExceptionHandler.java:108)
at org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.throwException(ExceptionHandler.java:84)
at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.getRuntimeMetaData(PreparedStatement.java:414)
at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.getProjectedColumns(PreparedStatement.java:377)
at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.declareCustomColumn(PreparedStatement.java:1223)
at org.eclipse.birt.data.engine.executor.DataSourceQuery.addCustomFields(DataSourceQuery.java:688)
at org.eclipse.birt.data.engine.executor.DataSourceQuery.prepareColumns(DataSourceQuery.java:411)
at org.eclipse.birt.data.engine.executor.DataSourceQuery.prepare(DataSourceQuery.java:349)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:621)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:349)
... 12 more
Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL statement does not return a ResultSet object.
SQL error #1:Invalid column name 'ExecutionMode'.

SQL error #2:The cursor 'jconnect_implicit_16' can not be used as it could not be found. It is possible that either it was not declared or it is not available in the current context.

SQL error #3:There is no cursor information given with the current datstream. A cursor id of zero was specified and no name was specified. The current batch of commands is being aborted. This is an internal error.

;
com.sybase.jdbc4.jdbc.SybSQLException: Invalid column name 'ExecutionMode'.

at org.eclipse.birt.report.data.oda.jdbc.Statement.executeQuery(Statement.java:482)
at org.eclipse.birt.report.data.oda.jdbc.Statement.getMetaUsingDefaultPolicy(Statement.java:389)
at org.eclipse.birt.report.data.oda.jdbc.Statement.getMetaData(Statement.java:330)
at org.eclipse.birt.report.data.oda.jdbc.bidi.BidiStatement.getMetaData(BidiStatement.java:56)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.doGetMetaData(OdaQuery.java:423)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery.getMetaData(OdaQuery.java:390)
at org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.getRuntimeMetaData(PreparedStatement.java:407)
... 19 more
Caused by: com.sybase.jdbc4.jdbc.SybSQLException: Invalid column name 'ExecutionMode'.

at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:3952)
at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3095)
at com.sybase.jdbc4.tds.Tds.getResultSetResult(Tds.java:3818)
at com.sybase.jdbc4.tds.TdsCursor.open(TdsCursor.java:329)
at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(SybStatement.java:2030)
at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:239)
at org.eclipse.birt.report.data.oda.jdbc.Statement.executeQuery(Statement.java:478)
... 25 more
Previous Topic:Export odt + birt
Next Topic:Birt Report not getting the updated Stored Procedure output(records)
Goto Forum:
  


Current Time: Sun May 27 03:06:50 GMT 2018

Powered by FUDForum. Page generated in 0.01744 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top