🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.visual-basic
Article #20878

����SQL��ѯ��һ�ʣ�����ش�

#20878
From: �ɰ�������
Date: Wed, 30 Jul 2003 15:38
27 lines
1922 bytes
��һ���?��a,b,c,d,e�����ֶΣ������avg(a) as avga group
by e��b,c,d ѡ��������Ϊһ����ʱ�ļ�¼�С�����e��ֵ��ͬ�Ļ���
��b,c,d��ֵҲ��ͬ�������ѡ��������ݱ�������ʾ����ָ��һ�¡�
һ������������д�ģ�������ô�ģ�лл������
 lstrSQL = ""
    lstrSQL = lstrSQL & "Select avg(a)as avgdangliang Group by e,"
    lstrSQL = lstrSQL & "b,"
    lstrSQL = lstrSQL & "c,"
    lstrSQL = lstrSQL & "d"
    lstrSQL = lstrSQL & "From ** "
    lstrSQL = lstrSQL & "Where [e] = '" & _
        DIDCombo.Text & "'"
    dbString = App.Path & "\**.mdb"
    Set db = OpenDatabase(dbString)

    ' Execute the query.
    Set rs = db.OpenRecordset(lstrSQL,?)
    ' Display the results.
    lblDangliang.Caption = Format$(rs(0))
    lblCondiction.Caption = Format$(rs(1), rs(2), rs(3))


--
���ҵ�è�д���ȥ��ѩ������


�� ��Դ:��BBS ˮľ�廪վ smth.org��[FROM: 211.80.32.6]
Technical Details
Message-ID: <000000$58W@smth.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!SMTH

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: 109fdd,5ee8755e6c12db2b,start
X-Google-Attributes: gid109fdd,public
X-Google-ArrivalTime: 2003-07-30 08:40:11 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.76.MISMATCH!feed2.newsreader.com!newsreader.com!maily.cic.tsinghua.edu.cn!SMTH
From: flyrabbit@smth.org (�ɰ�������)
Newsgroups: cn.bbs.comp.lang.visual-basic
Subject: ����SQL��ѯ��һ�ʣ�����ش�
Date: 30 Jul 2003 15:38:21 GMT
Organization: BBS ˮľ�廪վ
Message-ID: <000000$58W@smth.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: VisualBasic/u/M.1059579007.F0
Lines: 27