超级SQL——在SQL中累加
此为转贴,但是从连个帖子中收集而来
下面来一起看看论坛里的一个oracle方面的问题:
====================Question
=========================
jmbdat dayt y mon
27-9月-07 2033.2 2007 200709
28-9月-07 2750.28 2007 200709
29-9月-07 2885.68 2007 200709
30-9月-07 2556.68 2007 200709
01-10月-07 2903.04 2007 200710
02-10月-07 1002.96 2007 200710
03-10月-07 1038.24 2007 200710
对上边的表用sql处理下 变成下面的
jmbdat dayt y mon mont
27-9月-07 2033.2 2007 200709 2033.2
28-9月-07 2750.28 2007 200709 4783.28
29-9月-07 2885.68 2007 200709 7669.16
30-9月-07 2556.68 2007 200709 20225.84
01-10月-07 2903.04 2007 200710 2903.04
02-10月-07 1002.96 2007 200710 &
相关文档:
我公司在组建局域网时,考虑到商业企业的特点,仔细考量了购、销、存三大环节中发生的各种数据及其存储问题后,选定了以Windows 2000 Server为操作系统,SQL Server 2000为数据库平台来搭建局域网的应用系统的软件平台,以网线为载体将购、销、存等核心部门的计算机通过局域网平台紧密地连接起来。这样,各个核心部门每天 ......
select Convert( varchar(20) , 时间字段 , 格式 ) from 表 如:select Convert(varchar(20),LOGIN_DATE,112) from dbo.C_PARTY_CLIENT 100:Jun 22 2009 12:00AM 101:06/22/2009 102:2009.06.22 103:22/06/2009 104:22.06.2009 105:22-06-2009 106:22
select Convert(varchar(20),<时间字段>,<格式>) f ......
Select * from t_user_profile where convert ( varchar ( 21 ),regDate, 120 ) like ' 2008-05-07% ' 表名称:t_user_profile 日期字段名称:regDate
Select * from t_user_profile where convert(varchar(21),regDate,120) like '2008-05-07%'< ......