- 博客(19)
- 收藏
- 关注
原创 最近2个月的work
------------- 2个月工作 1.ssis 包 数据迁移 2.mysql windows replication slave 制作 3. mssql procedure ---- ddl triggercreate table xwj_loong_update_version(id bigint identity(1,1) , Even
2009-07-31 17:03:00
275
原创 考勤建模
Scriptsif object_id(Ncompanydepartment,U) is not nulldrop table companydepartment;create table companydepartment(depart_id int identity(1,1) not null, depart_emid int default(0)
2009-04-20 15:32:00
305
原创 itpub图灵奖10题目附自己写的答案(-)
第1题:十里挑一Alan Flancman 在将一些遗留系统数据迁移到SQL数据库时遇到一个问题。表是这样的:CREATE TABLE MyTable (keycol INTEGER NOT NULL, f1 INTEGER NOT NULL,f2 INTEGER NOT NULL, f3 INTEGER NOT NULL, f4 INTEGER NOT NULL,
2009-04-09 19:14:00
1114
原创 事务错误 和进程阻塞
--阻塞和错误 --version 2005declare @tcount int,@rcount intselect @tcount=@@trancountif @tcount=0 ---外部没有事务打开begin tranelse save tran s1 --外部事务已经打开begin tryset lock_timeout 5000 --5秒超时select b.text,c.*,d.*
2009-03-29 16:49:00
303
原创 捕捉在 read committed 情况下的死锁 防止牺牲死锁或无限等待
--version 2005--捕捉在 read committed 情况下的死锁 防止牺牲死锁或无限等待create proc deadlock_error_info(@sqltext varchar(8000)/*,@errorinfo varchar(1000) output*/) ---大语句容量建议用maxasdeclare @sql varchar(8000),@rowcount i
2009-03-25 01:50:00
332
原创 字符串处理
dad(0d)da(da)da()ssxxxxx(2弄)(3路)xxx()xxx去掉()内的字符--2005select * into ## from(select sring=xxxxx(2弄)(3路)xxx()xxx union all select dad(0d)da(da)da()ss)x--cte+nums 解决with xwjas(select id=1 union
2009-03-12 15:19:00
343
原创 图解ssis包配置动态路径加批量循环导入xls文件
先在控制流连接管理器里面建立个ado.net连接管理器. 2 在连接里面选择 连接access的 jet 4.0 ole db provider 3在 全部 里面把 高级中 exrended properties 改为 Excel 5.0 4在 连接管理器里面 新建 ole db连接服务器名=机器名/实例名连接数据库 选择你要连接的数
2009-03-01 23:24:00
1492
原创 图解SSIS批量导入txt文件
---看了贾涛的图解SSIS批量导入Excel文件贾涛blog :http://blog.youkuaiyun.com/jinjazz/archive/2008/07/25/2710169.aspx依葫芦画瓢做了个批量 导入txt文件 1先建立txt文件 2 在 SQL Server Business Intelligence Development Studio or v
2009-02-23 01:49:00
3156
3
原创 关于人事岗位变动(适用于bom)
--http://blog.youkuaiyun.com/wlzd3636--关于人事软件中的员工岗位调整--员工岗位表if object_id(Njobcode,U) is not nulldrop table jobcode;create table jobcode(id smallint identity(1,1) , jobcode char(5) not null, jobname var
2009-02-12 14:55:00
422
原创 关于分页,排序中 子查询和排序函数,中间表+identity列的性能比较.
SQL code <!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->--个人blog http://blog.youkuaiyun.com/wlzd3636/--------
2009-02-03 20:56:00
560
原创 关于分组连续日期合并为一起的优化
问题见http://blog.youkuaiyun.com/wlzd3636/archive/2008/12/31/3670162.aspx 关于分组连续日期合并为一起的优化create table t(name varchar(10),date smalldatetime)insert into t select a,2008-01-01 union allselect a,200
2009-01-20 16:15:00
299
原创 t_sql查询步骤详解
--==testdata== --======徐王锦====== --==2009/01/15/pm 23:19==== --======关于查询语句的顺序======--test dataif object_id(Ncompany,U) is not nulldrop
2009-01-15 23:51:00
668
原创 关于 分组每次取随机 top 记录
关于 分组每次取随机 top 记录(csdn 看见问题 心血来潮)if object_id(tempdb..#,U)is not null drop table #gocreate table #(chapterid int, chapter varchar(10)) insert # select 1 , a insert # select 1 ,
2009-01-15 18:50:00
262
原创 关于ddl_datebase 触发器 监控某张表的ddl操作
关于ddl_datebase 触发器--记录xuwangjin表的 ddl操作只针对于 create table 和 drop table 因为object本身为table --2009/01/04 am 0:50徐王锦----转贴请注明--create trigger ddl_tr_xuwangjin on databasefor ddl_database_level_eventsasdecl
2009-01-04 00:58:00
477
1
原创 关于仓库的先进先出
--问题进货表结构: 连接:http://topic.youkuaiyun.com/u/20080825/20/c81e3462-942b-40d5-971b-b7b94f15590f.html进货编号 品名 单价 进货数 ----------- ---------- --------------------- ---------
2008-12-31 22:43:00
1131
1
原创 关于分组连续日期合并为一起
--测试数据create table t(name varchar(10),date smalldatetime)insert into t select a,2008-01-01 union all select a,2008-01-02 union all select a,2008-01-03 union all select a,2008-01-06
2008-12-31 17:11:00
584
原创 xml之浅谈path和raw
--转帖请注明----2008/12/29/pm 12:10 徐王锦----xml 浅谈 path 和 raw if object_id(Ntest,U) is not nulldrop table testgoselect * into test from (select id=1,name=金庸 union all select id=2
2008-12-29 01:16:00
529
1
原创 判断数据库表dml操作的类型
判断数据库dml操作的类型--演示准备if object_id(Ntesting,U) is not nulldrop table testinggocreate table testing(id smallint)goif object_id(Ntr_dml_type_testing,TR) is not nulldrop trigger tr_dml_type_testing
2008-12-28 02:00:00
305
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人