I am trying to query a sybase databse via a ODBC ASE connection within SSRS.
However I get the following error when I attempt a query that uses a derived table:
FROM ( SELECT CASE WHEN name IN ('appliction_1', 'application_2') THEN 'My Application'
WHEN name IN ('appliction_3', 'application_4') THEN 'Your Application'
ELSE 'Other Application' END AS application_name
ORDER BY name ) x
WHERE application_name != 'Other Application'
ERROR  [MERANT][ODBC Sybase ASE driver][SQL Server]Incorrect syntax near 'FROM'.
Any ideas? I've tried SELECT x.application_name but I still get the same error.