I believe these instructions are what you are looking for:
https://www.ibm.com/support/knowledgecenter/SSEP7J_11.1.0/com.ibm.swg.ba.cognos.ug_cr_rptstd.doc/t_cr_rptstd_wrkdat_build_report_using_your_own_sql_mdx_rel.htmlBe aware that there are many negatives to bypassing the Cognos metadata layer in this fashion, but I find it useful when reporting across multiple schemas which are not completely represented in our models, when using more esoteric vendor-specific functions and syntax, and occasionally just for development speed to get an ad hoc report out the door. Realize that the code you create will not be portable, and may not be supportable by those who rely on a user-friendly metadata interface.
------------------------------
Michael Walter
Business Analyst
TX HHSC
Austin
------------------------------
Original Message:
Sent: Thu November 05, 2020 11:19 PM
From: oba oba
Subject: SQL in cognos
Hi all;
I am new to cognos. I was just wondering if you can use SQL to directly generate a report in cognos, if so how. I have tried writing a simple sql statement such as select * from table_name but it gives me an error. Hence I will appreciate if someone can explain to me how to use sql to create a report in cognos.
------------------------------
oba oba
------------------------------
#CognosAnalyticswithWatson