我想实现下面的结果在datagrid中显示,请写出代码,谢谢!
Date Series AssyPN Failure Description
201012-20 NEO 750-031088 hsl2fail
201012-20 NEO 750-031088 hsl2fail
201012-20 NEO 750-031088 hsl2fail
201012-20 AgentSimth 750-031088 hsl2fail
201012-21 AgentSimth 750-031088 hsl2fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-23 NEO 750-031088 diag luchip fail
201012-23 NEO 750-031088 diag luchip fail
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stressTopIssue Failure Description Count
Top 1 diag luchip fail 10
Top 2 ram_bist all stress 8
Top 3 hsl2fail 6
Date Series AssyPN Failure Description
201012-20 NEO 750-031088 hsl2fail
201012-20 NEO 750-031088 hsl2fail
201012-20 NEO 750-031088 hsl2fail
201012-20 AgentSimth 750-031088 hsl2fail
201012-21 AgentSimth 750-031088 hsl2fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 NEO 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 boot fail
201012-21 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 AgentSimth 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-22 NEO 750-031088 diag luchip fail
201012-23 NEO 750-031088 diag luchip fail
201012-23 NEO 750-031088 diag luchip fail
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 AgentSimth 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stress
201012-23 NEO 750-031088 ram_bist all stressTopIssue Failure Description Count
Top 1 diag luchip fail 10
Top 2 ram_bist all stress 8
Top 3 hsl2fail 6
from table1
group by 3 desc
'菜单"工程"->"引用" 找 Microsoft ActiveX Data Object.... Dim cn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim SqlStr As String
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb;Mode=ReadWrite;Persist Security Info=False;Jet OLEDB:Database Password=111"
SqlStr = "Select Date,Series,AssyPN,Failure,Description From 某个表"
rst.CursorLocation = adUseClient
rst.Open SqlStr, cn, adOpenDynamic, adLockOptimistic, adCmdText '打开记录集
Set DataGrid1.DataSource = rst '给DataGrid修改数据源
Top1 diag luchip fail 10
Top2 ram_bist all stress 8
Top3 hsl2fail 6