>Hi folks,
>
>Vfp 7 help file mentions about parenthesis to combine multiple unions in select sql command.
>
>I can't get it to work. Please help...
>
>TIA
>
>-Ahmed
Can you post the SQL you are trying to use? General tips:
The fields you select must be of the same data types in each SELECT in the union. You can only have 1 order by and group by clause and they must be after the last SELECT. You can use a GROUP BY in a sub-query. The 3rd line below is a sub-query:
select number_field, date_field from ...
where somefield in
(select * from ... where ... group by...)
union
select number_field2, date_field2 from ...
group by ...
order by...
Mark McCasland
Midlothian, TX USA