=======SQL语句请教各路朋友,大家请进==========
zhlym 2005-05-24 12:09:47 我如下这句要改成只取pubtable库的sellautoid字段唯一值,应怎改?
select a.autoid,a.monberin,a.carno,a.carno1,a.bx_date,a.bx_time,a.yj_date,a.yj_time,a.wx_suxi,b.indate,b.antrueman,b.enddate from reparein a, pubtable b where a.officeid='"&Session("officeid")&"' and b.officeid='"&Session("officeid")&"' and a.monberin=b.sellautoid and a.monthjie='0' and b.indate between '"&sdate1&"' and '"&sdate2&"' and b.antrue=2 order by a.monberin desc
请大家看清楚我的要求,不要select distinct sellautoid from pubtable出现这种情况