on 05-09-2012 11:33 AM
Dear All,
I sometimes use UNION ALL in SQL Queries to join the results of 2 similar queries together.
Like:
SELECT ... etc
FROM ...
WHERE ...
union all
SELECT ...
FROM ...
WHERE ...
I am writing a report in Crystal Report (for the 1st time),and incorporate SQL commands in
Crystal Reports.
I find that UNION ALL does not work.
Could anybody explain how I could do the equivalent of UNION ALL in Crystal Reports 2008 (ver 12.1.3.1028)?
Best Regards,
Leon Lai
---------------------------------
PS
If I am not following the SCN rules strictly, please be forgiving and answer my question here all the same.
I am having a very bad time finding my way in this new web site.
It will take me some time to get accustomed.
I do not even know where to award points to the experts, so if I don't award points, this is not intentional.
hi Leon
Union All will work in crystal reports.
we built report by using that
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kamba,
Thanks for your reply. It gives me hope.
However, it does not work on my end.
The 2 queries work well separately in Crystal Reports.
But when I type 'UNION' or 'UNION ALL' between the 2 halves, it gives me this error message:
Failed to retrieve data from the database.
Incorrect syntax near the keyword 'UNION'
Pl note that I paste my SQL here (in Crystal Reports):
Database --> Database Expert ---> Edit Command
However, it works perfectly in SAP's Query Window.
What version of Crystal Reports do you use?
Thanks
Leon
User | Count |
---|---|
90 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.