Shyam_Beerakayala

CA Clarity Tuesday Tip: How to run SQL queries from Clarity?

Discussion created by Shyam_Beerakayala Employee on Jul 10, 2012
Latest reply on Aug 17, 2012 by Dave
How to run SQL queries from Clarity even when you do not have database access?

The below steps can be used to run the sql queries (only select queries):

You need to have Clarity Administration access for this procedure.

From Administration:

1. Under Data Administration, click on Lookups

2. Click on New button to create a new lookup

3. Give a Lookup Name and Lookup Id

4. From Source, choose Dynamic Query option

5. Click Submit (Save and Continue in v13) button

6. In the Lookup Properties window, in the text box for Niku Query, enter your SQL, something like:
(the SQL has to be select queries only)

select * from cmn_install_history

or

select * from cmn_install_history where install_id = 'database'

7. Click on Save and Continue button

8. Click on Save and Continue button again in the Parent Window

9.From the Browse Window, click on the Preview button

This will open a popup window with the query results in a grid.

10. Once you are done with this, you can delete the lookup from the Lookup list page

Shyam Beerakayala
Principal Support Engineer

Outcomes