Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subquery invalid
Message
 
 
To
21/11/2006 17:26:37
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01171586
Message ID:
01171592
Views:
11
A subqueryn in a field list can return only 1 value
...
	(SELECT SUM(lm_wldelvf) FROM lotmast ;
	WHERE lm_flcode = hi_flcode ) AS sum1,  ;
	(SELECT SUM(lm_hddelvf) FROM lotmast ;
	WHERE lm_flcode = hi_flcode ) AS Sum2 ;
...
>
>What's wrong with this:
>
>
>SELECT hi_flcode, SUM(hi_amt), ;
>	(SELECT SUM(lm_wldelvf), SUM(lm_hddelvf) FROM lotmast ;
>	WHERE lm_flcode = hi_flcode ) ;
>	FROM hatcinfo ;
>	WHERE SUBSTR(hi_flcode,5,4) <= lcFlockNumberEnd  ;
>	AND SUBSTR(hi_flcode,5,4) >= lcFlockNumberBegin  ;
>	GROUP BY hi_flcode ;
>into CURSOR results
>
>
>I am getting an invalid subquery message.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform