How to convert Cognos query to SQL query

783 views Asked by At

I was working on Looker and I have to copy this Cognos query to Looker but apparently the SQL parameter on Looker did not work. I am not familiar with Cognos so I don't know how to solve this problem.enter image description here

I tried PARTITION function instead of FOR but still does not work. I expect it to run without errors

1

There are 1 answers

0
Daniel Wagemann On

A Cognos query will have both Cognos SQL and Native SQL. Native SQL is what goes down to the database, so that is probably what you want to grab.

Go to the query in question, using the properties pane, select generate SQL/MDX. Once the SQL is generated, grab the SQL from that window and try to send that to GBQ.