>I want the output from 3 SQL Selects in 1 file. What's the simplest way to do this?
>
>Select ... into DBF [A|B|C]
>then append from [A|B|C]
>then delete [A|B|C]
>
>'seems like too much overhead; especially on disk accesses.
>
>I tried "Select * from a,b,c into cursor qcOutput", but i ended up with 27 records instead of 9. I know the extra records are partially because i have no join condition. What is the syntax to fix this?
SELECT ... FROM origtable WHERE condition1 ;
UNION SELECT ... FROM origtable WHERE condition2 ;
UNION SELECT ... FROM origtable WHERE condition3 ;
INTO TABLE newversion
This will work as long as all 3 selects are taking the same fields from the original table, making it UNION compatible.