Article View: cn.bbs.comp.lang.visual-basic
Article #20748Re: �������sql���
From: �����ޡ���ӵ�Ұ�
Date: Thu, 31 Jul 2003 07:03
Date: Thu, 31 Jul 2003 07:03
36 lines
2661 bytes
2661 bytes
��ȥ��ϸ�����£���ʵ���������һ��sql������棬 ������ʾ�� select * from tabnam where �˳�ԭ��='F0' and (�˳�����,�˳�ʱ��) in (select �˳�����,max(�˳�ʱ��) from tabnam group by �˳�����) union select * from tabnam where (�˳�ԭ��='DSC20' or �˳�ԭ��='DSC21') and (�˳�����,�˳�ʱ��) in (select �˳�����,max(�˳�ʱ��) from tabnam where (�˳�ԭ��='DSC20' or �˳�ԭ��='DSC21') group by �˳�����) union select * from tabnam where �˳�ԭ��='P0' and (�˳�����,�˳�ʱ��) in (select �˳�����,max(�˳�ʱ��) from tabnam where �˳�ԭ��='P0') and �˳����� not in (select distinct �˳����� where �˳�ԭ��='F0') �� �� hermit (�����ޡ���ӵ�Ұ�) �Ĵ������ᵽ: �� : ��������ش𣬹ؼ���union��ʹ�ã��������sql��ִ�п϶��첻�� : on error resume next : rsdat.open "select distinct �˳����� from tabnam order by �˳�����" , _ : yourconnection, adOpenStatic, adLockOptimistic : do while not rsdat.eof : thedat=rsdat.fields(0).value : rsinf.open "select * from tabnam where �˳�����=#"+thedat+"# and _ : �˳�ԭ��='F0' and _ : �˳�ʱ��=( select max(�˳�ʱ��) from tabnam where _ : �˳�����=#"+thedat+"# _ : and �˳�ԭ��='F0') union _ : ................... -- [m[1;34m�� ��Դ:��BBS ˮľ�廪վ smth.org��[FROM: 218.244.235.163][m
Technical Details
Message-ID:
<000000$4ip@smth.org>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!cyclone.bc.net!logbridge.uoregon.edu!newsgate.cuhk.edu.hk!news.zixia.net!maily.cic.tsinghua.edu.cn!SMTHShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: 109fdd,9ebc4dae75c47e0c X-Google-Attributes: gid109fdd,public X-Google-ArrivalTime: 2003-07-31 00:05:06 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!cyclone.bc.net!logbridge.uoregon.edu!newsgate.cuhk.edu.hk!news.zixia.net!maily.cic.tsinghua.edu.cn!SMTH From: hermit@smth.org (�����ޡ���ӵ�Ұ�) Newsgroups: cn.bbs.comp.lang.visual-basic Subject: Re: ���д�����sql��� Date: 31 Jul 2003 07:03:16 GMT Organization: BBS ˮľ�廪վ Message-ID: <000000$4ip@smth.org> Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 8bit X-Filename: VisualBasic/H/M.1059634970.k0 Lines: 36