Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Directives in Crystal Reports?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I use Oracle as database for my reports. Because Oracle uses its internal optimizer for optimizing the used indices (or the order of the accessed tables) some reports are very slow. So I want to use SQL directives like
SELECT /*+ ordered*/
column1, column2, column3
FROM table1, table2,
WHERE .....

My problem is, that I cannot set the SQL directive for my report. If I set it in "Database>Show SQL Query" the changes take no effect. I also tried the API, but it was the same.
So my question: Is it possible, and how, to set an SQL directive for a report (for an SQL database like Oracle).

Regards,
a_name
 
You can't set hints and have them be passed down from Crystal.

The solution is to dump the sql into a stored procedure, where you can recreate the query and also utilise the hint for the report.

Naith
 
Thanks for your tip, but I found out, that it is possible with Crystal Reports 9.0.

Thank you for your response.
 
9 is a huge leap forward as far as SQL is concerned. v9 supports any SQL statement that you may use to query the database directly. I wasn't sure which version you were using.

Naith
 
Thanks for your help. I am currently using CR 8.5, but I hope that CR 9.0 supports SQL directives. I've already ordered it.

Thanks for your fast response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top