COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: midhl on 16 Mar 2012 12:34:38 AM

Title: Sql when validated throwing error
Post by: midhl on 16 Mar 2012 12:34:38 AM
Hi,

We have a requirement where we are expected to build a report using tabular SQL.This SQL involves number of tables,joins and sub queries. When the SQL is validated it is throwing an error saying "The server returned an unrecognizable query framework response"
One thing was observed when I checked the individual tables something like select * from table and it was validating without any issues but when multi tables are used in the select statement with the join conditions this error is getting displayed.

When googled for the error it says "The user inserting the SQL based query does not have sufficient permission on the User Defined SQL Secured Feature Capability.
or it might be due to invalid queries"

But when I write simple queries using all the tables with join conditions its throwing this error.

Can anyone tell me what might be the issue.

Thanks in advance
Title: Re: Sql when validated throwing error
Post by: Lynn on 16 Mar 2012 07:24:40 AM
Do you have any calculations or functions or case statements in the select clause? If so try including an alias name for those columns.

You should also check the SQL by running directly against the database to make sure you don't have a syntax error of some sort.

Personally I would question a requirement that dictates the use of SQL based queries, but that is another story.
Title: Re: Sql when validated throwing error
Post by: midhl on 17 Mar 2012 02:00:33 AM
Hi Thanx for your reply. Original Queries have calculations,subqueries as well. But I tested the query by removing all the calculations with just the tables and joins.
For ex: select * from a,b,c where a.colname=b.colname and b.colname=c.colname

In the above example if i do a select * from a or select * from b or select * from c then this query gets validated but if I use more than one table in a select statement then it throws the same error.

The same query with all joins, calculations and subqueries its working fine in DB but the error we see is in the report end. When I googled it was mentioned that this is due to "The user inserting the SQL based query does not have sufficient permission on the User Defined SQL Secured Feature Capability."

But if that is the case even the select * from individual tables should throw the same error but thats not the case.

Thanks once again for your reply

Title: Sql when validated throwing error
Post by: Lynn on 18 Mar 2012 11:17:11 AM
You pretty much just repeated your first post. Do all your calculated columns have alias names?

What other troubleshooting have you done besides trying a very simple query? I suggest you build up your query in small increments and test with each step to find where your error is lurking.


Sent from my iPhone using Tapatalk
Title: Re: Sql when validated throwing error
Post by: midhl on 19 Mar 2012 05:14:11 AM
There are no calculations in the query but there are subqueries. Trouble shooting wise cannot do much cos whatver was tried except for the select * statement it was returning the same error.

Thanks
Title: Re: Sql when validated throwing error
Post by: ewangai on 12 Jul 2012 05:52:17 AM
Hello, Obviously not a prompt response so if you have not already solved this, make sure your SQL properties are set right. The Data source has to be the correct database (If using dual then any oracle db will do)