Hi:
Very new to DB2, so please be gentle!
I am doing a proof of concept using Microsoft SQL Server Reporting Services as the reporting engine for our DB2 databases.
While I am able to connect using iSeries Access for Windows and run reports just fine, I am unable to get the following to work and I think that it is just a DB2 SQL thing:
1. I can create a report that prompts the user to select a value to filter the result set with just fine. For example, I can create a report to list the sales offices based on a parameter of US State. I can run the report, select "New Hampshire" and the report returns only the New Hampshire offices. Great.
2. What I want to do is also offer the report user the option of listing all of the sales offices in the database. The following code is shown as an example provided by Microsoft:
SELECT 0 AS DepartmentID, 'All' AS Name
UNION
SELECT DepartmentID, Name
FROM Department
ORDER BY Name
When I try to use this code (modified for our databases, of course), I receive an error message from the ODBC driver that states "SQL0104 - Token was not valid. Valid tokens:, FROM INTO."
What am I doing wrong?
Thanks in advance.
Very new to DB2, so please be gentle!
I am doing a proof of concept using Microsoft SQL Server Reporting Services as the reporting engine for our DB2 databases.
While I am able to connect using iSeries Access for Windows and run reports just fine, I am unable to get the following to work and I think that it is just a DB2 SQL thing:
1. I can create a report that prompts the user to select a value to filter the result set with just fine. For example, I can create a report to list the sales offices based on a parameter of US State. I can run the report, select "New Hampshire" and the report returns only the New Hampshire offices. Great.
2. What I want to do is also offer the report user the option of listing all of the sales offices in the database. The following code is shown as an example provided by Microsoft:
SELECT 0 AS DepartmentID, 'All' AS Name
UNION
SELECT DepartmentID, Name
FROM Department
ORDER BY Name
When I try to use this code (modified for our databases, of course), I receive an error message from the ODBC driver that states "SQL0104 - Token was not valid. Valid tokens:, FROM INTO."
What am I doing wrong?
Thanks in advance.