Post your Crystal version and the database being used, and the connectivity, it doesn't take that much time and the methods vary based on the software. If SQL Server, so state, SQL is a language, not a product.
In CR 9 and above, you can paste in a SQL statement using the Add Command underneath your connection, or in previous versions and later versions, you can just add the table and go into the Report->Selection formulas->Recotrd and place:
{table.a} = "1"
This assumes that the field is a string as in your example.
Please, on subsequent posts, define your environment so that others don't have to guess or explain every possibility.
Sorry for not being clear.
I am trying to pull information from oracle database using crystal 10. This is what i am trying to do
Select a, b, c,
from table1
where a = 1 and b in
(select d
from table2
start with d = '{?d}'
connect by prior d = reporting_d);
The command keeps giving me an error message when I try to save it.
I can pull the information without going through this difficulty just only by creating the command for the reporting sql statement, the problem with that is it takes forever.
As previously requested, post the connectivity being used. You should be using the Oracle native connectivity for the best results in CR 10.
If you receive an error, post specifically what the error says, stating that you have one is important, but far less so if you don't share what it is.
The subquery that you reference here should be fine providing that you can execute the same thing from within a PL/SQL tool without an error. The hierarchical stuff might be tweaking the Oracle driver. I've not tried this syntax and would opt for a Stored Procedure here.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.