Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subquery
Message
From
10/08/2016 03:50:14
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Network:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01639295
Message ID:
01639302
Views:
52
Sir these codes have no error message but it is not performing group by acc_code
text TO query TEXTMERGE noshow

SELECT distinct(data.acc_code) as acc_code ,max(data.acc_name) as acc_name,
sum(data.qty)as qty,
sum(data.cr_amount)as c_ramount
from (

SELECT acc_code ,acc_name, qty, cr_amount
	from crsalp where substring(acc_code,1,2)='32'  and type='P'

union all

SELECT acc_code ,acc_name, qty, cr_amount
	from cashsalp where substring(acc_code,1,2)='31'  and type='P'
) as data
group by
data.acc_code

ENDTEXT
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform