🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.database
Article #9836

Re: ��̸������SQL�����ôд

#9836
From: fat man
Date: Sun, 09 Aug 1998 00:00
31 lines
1842 bytes
�� �� nightcat (ҹè��) �Ĵ������ᵽ: ��
: �� �� Leeht (Leeht) �Ĵ������ᵽ: ��
: : ��һ��test (something integer, Indate date)
: : somethingΪ����IndateΪ������  �������ա�����Ҫ���·���ͳ��something
: : �ĺͣ������SQL�����ôд��
: : ���е�������£�
: : something            Indate
: : 2                   95/3/1
: : 4                   95/3/12
: : 1                   95/3/21
: : 4                   95/3/31
: : 20                  95/4/3
: : 7                   95/4/10
: : 19                  95/4/20
: : 6                   95/5/1
: : 7                   95/5/10
: : 4                   95/5/21
: : ͳ�ƽ��Ӧ��Ϊ��
: : 95��3��     11
: : 95��4��     46
: : 95��5��     17
: : �����
: SQL���ʵ�ֱȽ����ѣ����±���Ҫ�ô洢���

select substring(convert(char(6),indate,12),4),sum(something) from
   sometable group by substring(convert(char(6),indate,12),4)

that's ok

--
�� ��Դ:���������� BBS bbs.nease.net��[FROM: 202.96.182.182]
Technical Details
Message-ID: <3Q1gb4$UWU@bbs.nease.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: 101948,a299473f15b39cfd,start
X-Google-Attributes: gid101948,public
From: szshigw.bbs@bbs.nease.net (fat man)
Subject: Re: ��̸������SQL�����ôд
Date: 1998/08/09
Message-ID: <3Q1gb4$UWU@bbs.nease.net>
X-Deja-AN: 379325833
X-Filename: DataBase/M.902639860.A
X-Complaints-To: usenet@news.nease.net
X-Trace: news.nease.net 902640257 5296 202.96.152.195 (9 Aug 1998 05:24:17 GMT)
Organization: Net Ease
NNTP-Posting-Date: 9 Aug 1998 05:24:17 GMT
Newsgroups: cn.bbs.comp.database,