Simon France
asked on
Using subqueries in Crystal Reports record selection
I am trying to create a report that selects all results for learners if only one of their results is for a particular class. So, I only want the results for learners on this class but I also want the results for all their other classes.
I am trying to incorporate a subquery into my record selection criteria but it doesn't like the syntax for the IN function.
{course.parkey} = 14 and
{results.ressdate} <> DateTime (1900, 01, 01, 00, 00, 00)
and {results.stukey} in (SELECT stukey FROM results WHERE csekey=12249;)
I have tried moving the SQL statement to a SQL Expression field but it fails because it returns more than one result.
I'm using Crystal Reports XI and the database is MIcrosoft SQL Server.
I am trying to incorporate a subquery into my record selection criteria but it doesn't like the syntax for the IN function.
{course.parkey} = 14 and
{results.ressdate} <> DateTime (1900, 01, 01, 00, 00, 00)
and {results.stukey} in (SELECT stukey FROM results WHERE csekey=12249;)
I have tried moving the SQL statement to a SQL Expression field but it fails because it returns more than one result.
I'm using Crystal Reports XI and the database is MIcrosoft SQL Server.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER