Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subquery problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01122135
Message ID:
01122152
Views:
25
Try
SELECT kontrah.kont_skr,  MAX(faktury.fakt_bru) AS OBROT ;
	FROM kontrah ;
	JOIN faktury ;
		ON faktury.kont_hex = kontrah.kont_hex  ;
	WHERE kontrah.kont_hex > 0 ;
        GROUP BY kontrah.kont_skr, faktury.kont_hex 

* or

SELECT kontrah.kont_skr, ;
	( SELECT MAX(faktury.fakt_bru) FROM faktury ;
		WHERE faktury.kont_hex = kontrah.kont_hex ) AS OBROT ;
	FROM kontrah ;
	WHERE kontrah.kont_hex > 0
>Query bellow fine working under sql server 2005 but under foxpro 9 I have error message:
> "Queries of this type are not supported"
> Ist the way to solve this problem ?
>
>"SELECT kontrah.kont_skr,;
> ( select top 1 faktury.fakt_bru FROM faktury 
WHERE faktury.kont_hex = kontrah.kont_hex ORDER BY faktury.fakt_bru desc) AS OBROT;
> FROM kontrah;
>  WHERE kontrah.kont_hex > 0"
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform