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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT in SQL Expression Field 1

Status
Not open for further replies.

handle1134

Programmer
Jul 20, 2006
24
RO
Hello!
I read about problems with SELECT in SQL Expression Field, in Crystal Reports, but in that article, gives a solution.
SELECT returns a range of data, so if we use Count, Minimum or Maximum, it will return only one result and it should work. (so they say). But it doesn't! The same:

Error in compiling SQL Expression:
Database Connector Error: 'SQL Expression: [SQL State:] 42000' [Error messange:] ORA-00936 missing expression
[Database Vendor Code: 936 ]'.

The SQL code a use is very simple:

SELECT COUNT(*)
FROM DP_APPLICATIONS

, where DP_APPLICATIONS is a table inserted with Database Expert.
Until now I cannot make it work for any SQL code, and I really need it. Not just this SELECT COUNT, but a lot of SQL in my report.
Where is the problem in this case?
Can we give me some example code that works? Or are there some specific syntax rules? (other than SQL)

I have DP_APPLICATIONS table with APPLICATION_ID (number) and APPLICATION_NAME (varchar2(60)) fields.
I use Crystal reports XI with a JDBC connector to a Oracle 10 database (remote).
OS Windows XP.

10x
 
In XI, SQL expressions don't have the same functionality as earlier versions. Instead go to database->database expert->your datasource->add command and enter the SQL there.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top