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

UNION ALL with parameter field in WHERE clause

Status
Not open for further replies.

morechocolate

Technical User
Apr 5, 2001
225
US
I have a report where I am using a union all. The first where clause is using the parameter from the Record Selection Criteria. I need the where clause after the union all statement to also use that parameter. Is that possible?

So far the report only works if I hard code the parameter value in the second where clause.

Thanks

mc
 
Please post your software version.

In CR 9 or above, you can use the Add Command to paste in SQL and then generate and apply parameters to the SQL.

If you have previous versions then you're probably better served to create a View on the database which performs the Union, or a Stored Procedure. In that case post your database type to get further assistance.

-k
 
Thanks k - I realized I had forgotten to mention that, the version.

I actually figured out the solution using feedback from IdoMillet in the thread149-438126. I changed my search criteria to help find the solution.

Thanks as always for your help.

mc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top