Hello,
I'm a bit new to BIRT and SQL, and I have what I hope is a basic question. I'm using MSSQL 2008 R2 and the JDBC driver from Microsoft. Everything works great, except when I try and use multiple SQL statements in a Data Set.
What I'd like do to is something like this:
CREATE TABLE #TEMPTABLE(
--code
);
INSERT INTO #TEMPTABLE
SELECT
--code;
SELECT
--code
FROM #TEMPTABLE;
DROP TABLE #TEMPTABLE;
First I tried this with MSSQL table variables (
@TEMPTABLE) and I've also tried it not using temp tables at all but just regular tables. Everything I do works great in SQL studio, but fails in BIRT with
org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.
I know the sql code works, so I think I'm missing some sort of separator between statements or something. Is what I'm trying to do possible? And yes, I understand using temp tables like this is not good form in SQL and I should try to get it all in one query if possible. I'm learning fast, but right now I have a powerful need to "get it done".
Thanks again.