Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

[WD 21], Subquery with union(s) for report

$
0
0
Need to create a query file which consist of subquery like below,

Select Column_Name1,Sum(Total) as Total,Sum(Quantity) as Quantity
From
(Select Column_Name1,Count(Column_Name2) as Total,0 as Quantity
From Table_Name1
Group by Column_Name1

union all

Select Column_Name1,0 as Total,Count(Column_Name2) as Quantity
From Table_Name2
Group by Column_Name1)

Group by Column_Name1
having sum(Total) > 0

This query runs successfully in HFSQL control center. When i try to create in windev Query Editor is not allowing to create it.

How to do it Please help me.

I want to create a report based on this query.

Regards,
R.R.Siva Sangavi

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>