表名: date
cbstartdate cbenddate
2010-03-16 12:00:00.000 2010-05-17 17:45:23.000
2010-03-17 12:00:00.000 2010-05-18 23:45:55.000
2010-04-12 12:00:00.000 2010-05-18 23:44:06.000
2010-05-12 12:00:00.000 2010-05-18 23:46:05.000
2010-05-12 12:00:00.000 2010-05-18 23:46:05.00 ......
两表,
A 表(订单)
order style customer qty
1000 22 33 10
1000 22 33 -4
1000 22 33 -1
1000 44 33 8
1000 44 33 -4
B表(已出货)
order style customer qty
1000 22 33 2
1000 22 33 1
1000 44 33 ......
1.下面有表
name birth
a 1981
b 1981
c 1980
d 1981
e 1980
2.写一sql得到下面的结果
name1 name2 birth
a b 1981
a d 1981
b d 1981
c e 1980
下面是我的记过,老是去不了重复的:
select * from testj;
select distinct a.name,b.name,a.yea ......
有这样一个表,wy_yslb,字段有yslb_id,yslb_cname,yslb_parentid,yslb_class,yslb_mjflg.一个树形结构,yslb_mjflg = '1'即为最末级。
例如: yslb_id yslb_cname yslb_parentid yslb_class yslb_mjflg
1 A 0 1 0
2 ......
请问各位如何将我查询的结果直接导出成EXECL文件,例如将 SELECT 姓名,成绩,班级 from 学生表 ORDER BY 成绩
的查询直接导出成EXECL? 谢谢
bcp
http://blog.csdn.net/happyflystone/archive/2009/10/16/4684047 ......
regInfo 注册表
MemberId regDate
10001 2010-5-1
10002 2010-5-2
10003 2010-5-3
10004 2010-5-4
10005 2010-5-5
UserRecord 充值记录表
MemberId money dates
10001 5.00 2010-5-5
10002 10.00 2010-5-5
10001 15.00 2010-5-6
10003 5.00 2010-5-6
......