易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 : sql

sql server if 语句问题

现在有个需求
创建名为a的视图
a中的某项x的值由下面的条件决定
b表中的项目y如果有值则a中的x取b中的y
即if b.y !='' begin a.x=b.y end
如果b表中项目y为空且c表中的项目z有值则a的x取c的z
即if b.y='' and c.z!='' begin a.x=c.z end
大概思路是这样
自己在sql2000下写 ......

SQL按时间统计

SQL code:

---测试数据---
if object_id('[t1]') is not null drop table [t1]
go
create table [t1]([姓名] varchar(2),[类别] varchar(2),[时间] varchar(12))
insert [t1]
select '张','A' ,'201001251730' union all
select '王','B' ,'201001261530' union all
select '王','B' ,'201001272130' union all ......

关于sql获取真实网卡地址的问题

我用以下的语句,获取MAC :
create proc p_getlinkinfo
@dbname sysname=null,--要查询的数据库名,默认查询所有数据库的连接信息
@includeip bit=0--是否显示IP地址,因为查询IP地址比较费时,所以增加此控制
as
declare @dbid int
set @dbid=db_id(@dbname)

create table #tb(id int identi ......

这句sql文有错吗

"update lesson  set name='15',age='15',gen='True',date='2010-02-28',city='上海',where id='15'"
where前面的逗号你觉得多余不?

不是这里的问题,去掉这个逗号,仍然提示,同样的错误,就提示sql文有错误

去掉where的逗号后语法上已经没错误了 ......

一个pl/sql问题 关于异常处理

pl/sql :
            delete from trap_urrshis where type=trap_type and cycle>=vcycle_code_begin
commit;
              update table ....
                  commit;

......

ACCESS等库实现逐日统计 - MS-SQL Server / 基础类

表结构:
table1
证件号 时间  
X31 2010-01-11
3BC 2010-02-03
3AD 2010-02-03
F23 2010-02-09
......
现在要统计一个时间段如 2010-01-09 到 2010-02-09间的数据,
期待结果:
日期 数量
2010-01-09 0
2010-01-10 0
2010-01-11 1
2010-01-12 0
...
2010-02-09 ......
总记录数:3315; 总页数:553; 每页6 条; 首页 上一页 [206] [207] [208] [209] 210 [211] [212] [213] [214] [215]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号