子查询行不?
Examp:
SELECT lngBaseInfoTypeID,BaseInfo.strBaseInfoCode from BaseInfo
where lngBaseInfoTypeID in (select lngBaseInfoTypeID from BaseInfo)
order by lngBaseInfoTypeID
Examp:
SELECT lngBaseInfoTypeID,BaseInfo.strBaseInfoCode from BaseInfo
where lngBaseInfoTypeID in (select lngBaseInfoTypeID from BaseInfo)
order by lngBaseInfoTypeID
order_field_name(Index, 0)是排序字段变量名
可以使用filter和sort等属性来完成
,strBaseInfoCodefrom BaseInfo) Order By" + order_field_name(Index, 0)================================================================ok?
能否说详细一点,我是个初学者!:)
select (select field_2 from usertabb003 where field_1=substring(t1.field_2,1,1)),count(*),sum(field_6) from (select field_2 ,sum(field_6) as field_6 from usertabb005 where field_9<>'已收' group by field_2) t1
group by substring(t1.field_2,1,1)
select t1.* from (select field_1,field_2 from table1 ) t1 where t1.field_1='aa' order by field_1
sql="select * from ("+sql+") order by "+order_field_name(Index, 0)