sql="(select top 5 id,字段1,字段2,字段3,cast(id as nvarchar(1500)) as p,1 as pp from [TableName]) UNION (select top 5 id,字段1,字段2,字段3,cast(newid() as nvarchar(1500)) as p,2 as pp from [TableName] where id in (select top 10 id from [TableName] order by id) and id not in (select top 5 id from [TableName] order by id)) order by pp,p"
rs.open sql,conn,1,1
……