|
提取最高分所在的记录。 详情在附件中
记录.rar
(8.13 KB, 下载次数: 7)
With CreateObject("ADODB.Connection")
.Open "provider=microsoft.jet.oledb.4.0;extended properties='excel 8.0;hdr=yes;';data source=" & ThisWorkbook.FullName
[i14].CopyFromRecordset .Execute("Select * From (Select Top 1 Name, English As Score, 'English ' As Course From [sheet1$a1:q100] Order By Score Desc ) A Union All Select * From (Select Top 1 Name, Chinese As Score, 'Chinese' As Course From [sheet1$a1:q100] Order By Score Desc ) A Union All Select * From (Select Top 1 Name, Math As Score, 'Math' As Course From [sheet1$a1:q100] Order By Score Desc ) A")
.Close
End With
出 错了。
select ""中的根据:http://topic.csdn.net/u/20070322/00/fd80a717-8fa3-4097-b3dd-86e22141f3c0.html改的,不知为何不对。 |
|