Fernando Volquind
Fernando Volquind

Reputation: 67

COGNOS Report Studio - How to view all tables/columns from a datasource using SQL?

I am creating a report on Report Studio, using SQL queries. I add the SQL object to the queries pane and set a data source.

How can I list the datasource's tables (and the table's columns) using SQL queries?

If it helps, the underlying database is Oracle.

Upvotes: 1

Views: 2082

Answers (1)

Johnsonium
Johnsonium

Reputation: 2005

List of tables:

SELECT DISTINCT table_name FROM all_tables

List of columns:

SELECT column_name FROM all_tab_columns 

List of columns for a specific database:

SELECT column_name FROM all_tab_columns 
WHERE table_name = UPPER('{table name}')

Upvotes: 1

Related Questions