select x, y from a union sleect k, j from b union ...
ClientDataSet有AppendData属性,不知道AdoQuery有没有。
这样用order by 子句是可行的,但是你必须与TOP子句联用! select * from (select Top 1000 * from Product where GradeID='001010001' order by ProductNo) as t1 union all select * from (select Top 1000 * from Product where GradeID='002020001' order by ProductNo) as t2
union
sleect k, j from b
union
...
select * from (select Top 1000 * from Product where GradeID='001010001' order by ProductNo) as t1
union all
select * from (select Top 1000 * from Product where GradeID='002020001' order by ProductNo) as t2