Cognos 11.0.9 XQE-DAT-0001 Data source adapter error

XQE-DAT-0001 Data source adapter error: [SQL0199] Keyword AS not expected. Valid tokens: FULL LEFT CROSS INNER RIGHT EXCEPTION.

The SQL will run on the IBMi. It will also validate in Cognos with no errors. However, when I try to run the report in HTML or any other format, I get the above error. I’m not sure why this will validate in Cognos but not run in Cognos.

Hi there, were you ever able to figure out the issue with this SQL? How were you verifying that the SQL you are running against the IBMi is the same as what the report is actually generating? Some folks accidentally use the SQL generated for an individual query trying to track down SQL issues and, as the warning suggests when you use the “Generated SQL” button on an individual query.

Compare the following:


Many folks know about this differentation, but ensuring that you are running the same SQL as Cognos is obviously important so it is worth verifying. I might even go so far as to enable native SQL logging on Cognos to ensure that your comparison is apples to apples. Hope this helps!