问题描述
表名字chenzhu字段一:ID字段二:smalllocation字段三:smalllocationabcid1smalllocation成都smalllocationabc北京id2smalllocation西安smalllocationabc昆明id3smalllocation成都smalllocationabc上海id4smalllocation北京smalllocationabc昆明id5smalllocation成都smalllocationabc昆明id6smalllocation上海smalllocationabc成都id7smalllocation成都smalllocationabc昆明id8smalllocation上海smalllocationabc成都id9smalllocation成都smalllocationabc上海id10smalllocation成都smalllocationabc昆明现在我要读取数据2条数据这2条数据根据smalllocation和smalllocationabc来判断最多的数据读取2条读取出来的应该是成都-昆明、成都-上海.谢谢各位师傅帮我下
解决方案
解决方案二:
SQL="Selectj.JobId,j.Comid,j.JobName,j.Work_Area,j.Work_City,j.Edus,j.Deal,j.Number,j.Require,j.LastUpdate_Time,j.JobClass,j.End_Date,j.JobType,j.Email,c.CompanyName,c.Properity,c.WorkersFrom[gg_123_456]AsjInnerJoin[gg_789_456]AscOnj.Comid=c.ComidWherec.Flag=1AndLen(j.JobName)>0Andj.JobFlag=1AndDateDiff(d,j.End_Date,GetDate())<=0OrderByj.LastUpdate_TimeDesc"SetRs=Server.CreateObject("ADODB.Recordset")Rs.openSQL,Conn,1,1Fori=1to9999这个可以提出前面9999条数据,假如我有2万条。我怎么样只提出后面的1万零一条那?
解决方案三:
不好意思借用一下,我还没办法发表主题
解决方案四:
分组查询然后排序SELECTchenzhu.smalllocation+'-'+chenzhu.smalllocationabc,Count(1)ASzongshuFROMchenzhuGROUPBYchenzhu.smalllocation,chenzhu.smalllocationabcorderbyCount(1)desc;如果smalllocation要求是成都开始可以改为下列语句SELECTchenzhu.smalllocation+'-'+chenzhu.smalllocationabc,Count(1)ASzongshuFROMchenzhuwherechenzhu.smalllocation='成都'GROUPBYchenzhu.smalllocation,chenzhu.smalllocationabcorderbyCount(1)desc;其他的参照这两句自己改吧
解决方案五:
<%setrs6=server.createobject("adodb.recordset")sql="selecttop7*fromchezhufabuhebingwheresh=1andsmalllocation='成都市'orderbyiddesc"rs6.opensql,conn,1,1ifrs6.boforrs6.eofthen%><divid="articleline1">还没有发表群呢~~你发布嘛?</div><%elsedowhilenotrs6.eof%><divid="articleline"><ahref="qun/qunid.asp?qqqhao=<%=rs6("id")%>"target="_blank"><%=cutstr(rs6("dlmc0"),8,"")%> ←→ <%=cutstr(rs6("dlmc0abc"),8,"")%></a></div><%rs6.movenextloopendifrs6.closesetrs6=nothing%>我根据上面这个师傅套结果没有用谁帮我综合下
解决方案六:
错误类型:ADODB.Recordset(0x800A0CC1)在对应所需名称或序数的集合中,未找到项目。