Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 to VFP9 SQL work around
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01007840
Message ID:
01007844
Views:
14
Would this work for you
select DISTINCT pr.* ;
	from exp_tick et, property1 pr ;
	where (pr.key = et.key) ;
	into table (exp_prop);
	order by pr.key
It's better to use 2-3 letter meaningfull aliases in the queries. It makes code easier to read and maintain.

>VFP9
>
>have the following SQL that I need to convert from VFP6 to VFP9. I do not want to add an aggregate function to every field in this table that has a lot of fields.
>
>
>select  b.* ;
>from (exp_tick) a, property1 b ;
>where (b.key = a.key) ;
>into table (exp_prop);
>group by b.key ;
>order by b.key
>
>
>Could I do this instead?
>
>
>select key from (exp_tick) into cursor cur_exp group by key
>select key from property1 into cursor cur_prop group by key
>select b.* ;
>from cur_exp a, cur_prop b, ;
>where (b.key = a.key) ;
>into table (exp_prop) ;
>order by b.key
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform