- 博客(18)
- 资源 (13)
- 收藏
- 关注
转载 经典SQL语句大全
经典SQL语句大全 一、基础 1、说明:创建数据库 CREATE DATABASE database-name 2、说明:删除数据库 drop database dbname 3、说明:备份sql server --- 创建 备份数据的 device USE master EXEC sp_addumpdevice 'disk', 'testBack', 'c:\ms
2012-03-09 14:59:44
439
转载 标题:简单数据拆分(version 2.0)
/* 标题:简单数据拆分(version 2.0) 作者:爱新觉罗.毓华(十八年风雨,守得冰山雪莲花开) 时间:2010-05-07 地点:重庆航天职业学院 描述: 有表tb, 如下: id value ----------- ----------- 1 aa,bb 2 aaa,bbb,ccc 欲按id,分拆value列, 分拆后结果如下
2012-03-16 12:54:04
1212
转载 jquery使用技巧总结
jquery使用技巧总结 一、简介 1.1、概述 随着WEB2.0及ajax思想在互联网上的快速发展传播,陆续出现了一些优秀的Js框架,其中比较著名的有Prototype、YUI、jQuery、mootools、Bindows以及国内的JSVM框架等,通过将这些JS框架应用到我们的项目中能够使程序员从设计和书写繁杂的JS应用中解脱出来,将关注点转向功能需求而非实现细节上,从而提高项目的开
2012-03-16 10:44:16
331
原创 sql常用字符串处理
--将字符串转换Table ALTER FUNCTION [dbo].[StringToTable] ( /**//* 根据输入的@ParamIDList列表来生Name列表*/ @ParamIDList Varchar(5000), @ParamChar varchar(100) --分割符 ) RETURNS @Table_NameList table (
2012-03-15 16:16:26
420
原创 导出excel
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Text; using System.Data; /// ///ExportExcel 的摘要说明 /// public class ExportExcel : System.W
2012-03-15 15:57:58
483
转载 MSSQL如何实现日期的自动补全(补全数据表中缺失的日期)
在实际生活中我们会遇到很多日期缺失的问题,但在统计的时候要求 显示出缺失的日期,面对这样的问题,我们如何实现?这里我把自己 学习的三种方法给大家分享一下: 方法一:创建存储过程实现 --如何用"最小缺失数"实现确实日期的自动补全 -->生成测试数据: GO IF OBJECT_ID('TBL')IS NOT NULL DROP TABLE TBL GO
2012-03-14 09:47:23
1800
转载 从性能的角度谈SQL Server聚集索引键的选择
从性能的角度谈SQL Server聚集索引键的选择 简介 在SQL Server中,数据是按页进行存放的。而为表加上聚集索引后,SQL Server对于数据的查找就是按照聚集索引的列作为关键字进行了。因此对于聚集索引的选择对性能的影响就变得十分重要了。本文从旨在从性能的角度来谈聚集索引的选择,但这仅仅是从性能方面考虑。对于有特殊业务要求的表,则需要按实际情况进行选择。 聚集索
2012-03-09 15:10:57
385
转载 数据开发-经典
数据开发-经典 1.按姓氏笔画排序: Select * From TableName Order By CustomerName Collate Chinese_PRC_Stroke_ci_as //从少到多 2.数据库加密: select encrypt('原始密码') select pwdencrypt('原始密码') select pwdcompare('原始密码','加密后
2012-03-09 14:53:27
272
转载 SQLServer2000同步复制技术实现步骤
SQLServer2000同步复制技术实现步骤 一、 预备工作 1.发布服务器,订阅服务器都创建一个同名的windows用户,并设置相同的密码,做为发布快照文件夹的有效访问用户 --管理工具 --计算机管理 --用户和组 --右键用户 --新建用户 --建立一个隶属于administrator组的登陆windows的用户(SynUser) 2.在发布服务器上,新建一个共享目录,做
2012-03-09 14:47:21
277
原创 SQL 每行随机产生数字 常识
SELECT FLOOR(RAND(ABS(CHECKSUM(NEWID()))) * 100) AS Rnd, id, name FROM MyTable FLOOR(RAND(ABS(CHECKSUM(NEWID())))*100) --可以得到0~99之间的随机数 你可以用此句算概率什么的,如果要随机得到记录,则用 selecttop N *
2012-03-09 14:46:48
755
原创 sql 表结构操作
新建表: create table [表名] ( [自动编号字段] int IDENTITY (1,1) PRIMARY KEY , [字段1] nVarChar(50) default '默认值' null , [字段2] ntext null , [字段3] datetime, [字段4] money null , [字段5] int default 0, [字段6] Dec
2012-03-08 11:02:03
487
转载 判断SQL数据库、数据表、存储过程、视图、函数是否存在的方法
以下为大家介绍在sql下判断SQL数据库、数据表、存储过程、视图、函数是否存在的方法,需要的朋友可以参考下,希望对您学习sql的函数及数据库能够有所帮助。 一、数据库是否存在 if exists(select * from master..sysdatabases where name=N’库名’) print ‘exists’ else print ‘not exi
2012-03-06 16:07:40
600
原创 sql递归查询
if object_id('t1')is not null drop table t1 go create table t1 ( id int identity(1,1), code int, parentcode int ) go insert t1 sele
2012-02-24 14:54:10
384
原创 Log4Net
using System; using System.Collections.Generic; using System.Text; using log4net; using System.IO; using System.Data; namespace Tscc.Model { /// /// 日志帮助类 /// public cl
2012-02-16 11:01:13
372
原创 分页对象
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Tscc.Model { /// /// 分页属性实体类 /// [Serializable()] public class PageMo
2012-02-16 10:55:51
422
原创 net数据连接公共方法,有分页
using System; using System.Collections.Generic; using System.Text; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Collections; using Tscc.Model; n
2012-02-16 10:53:44
347
原创 sql分页存储过程
ALTER proc [dbo].[Z_proc_page] ( @table varchar(8000), --表名 @index int=1, --页码 @pageSize int=10, --显示条数 @orderBy varcha
2012-02-16 10:50:18
321
原创 net将汉字转换成简拼
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace Tscc.Common { public partial class PingYin {
2012-02-16 09:36:01
406
国家标准软件开发文档模板GB856T
2012-01-04
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅