- 浏览: 112349 次
- 性别:
- 来自: 深圳
最新评论
-
lwbjava2011:
...
通用复制内容到剪切板 -
zxsz4085:
火狐下没用啊,咋回事
通用复制内容到剪切板 -
rigger21:
...
禁止输入 -
inshua:
why not disabled=true
禁止输入
文章列表
SELECT OBJECT_NAME([object_id]),*FROM sys.sql_modulesWHERE PATINDEX('%b_order%',[definition])>0
查看哪些视图、存储过程、函数等对象引用了 b_order 表
- 2009-08-12 14:58
- 浏览 979
- 评论(0)
<treeview id="tvUsers" runat="server" showlines="true" showcheckboxes="All" onclick="OnTreeNodeChecked()"></treeview>
<script language="javascript" type="text/javascript">
function OnTreeNodeChecke ...
- 2009-08-06 16:27
- 浏览 822
- 评论(0)
SQL Server中一些有用的日期sql语句1.一个月第一天的 SELECT DATEADD(mm, DATEDIFF(mm,0,getdate()), 0) 2.本周的星期一 SELECT DATEADD(wk, DATEDIFF(wk,0,getdate()), 0) 3.一年的第一天 SELECT DATEADD(yy, DATEDIFF(yy,0,getdate()), 0) 4.季度的第一天 SELECT DATEADD(qq, DATEDI ...
- 2009-06-16 17:12
- 浏览 1160
- 评论(0)
select rowcnt from sysindexes where id= object_id('表名) and indid=1
- 2009-05-04 19:50
- 浏览 734
- 评论(0)
求小数后多于两位的数字
- 博客分类:
- SQL
select 数字 from tabwhere 数字 * 100 <> cast(数字 * 100 as int)
- 2009-04-21 15:49
- 浏览 746
- 评论(0)
<div style="width: 165; height: 175px; margin: 0 auto; padding: 0; margin-top:2px;"> <div style="width: 165; height: 21px; background: url('/Images/Translate_Top.gif') left center no-repeat; margin-top:15px!important;margin-top:5px;"> </div> <div styl ...
- 2009-02-18 21:41
- 浏览 1081
- 评论(0)
<script type="text/javascript">function addtothis(){ var ti = escape(document.title); var lc = escape(document.location); var reurl ="http://www.addthis.com/bookmark.php?v=12&winname=addthis&pub=myeglobal&s=&url="+lc+"&title="+ti window.open(reu ...
- 2009-02-18 21:39
- 浏览 796
- 评论(0)
方法一:直接读取图片文件
/// <summary> /// 生成缩略图 /// </summary> /// <param name="localPath">原图路径</param> /// <param name="toWidth">缩略后的宽</param> /// <param name="toHeight">高</param> /// <r ...
- 2009-01-10 10:52
- 浏览 1013
- 评论(0)
select查询 赋值
- 博客分类:
- SQL
用 set 可以直接将 null 赋值给某变量 如: set @Id = null
用 select 查询时赋值,需注意几个问题
1. 当查询语句 没有用到聚合函数,若查询结果为空,则不会给变量赋值 如:
select @Id = Id from tab where Id = -1
@Id 为 null
2. 当查询语句 用到聚合函数 ( AVG MIX MAX SUM ),查询结果 不管 是不是空,都会给变量赋值 如:
set @Id = 0
select @Id = avg( Id ) ...
- 2008-12-08 16:45
- 浏览 1322
- 评论(0)
主机报警:
using System.Runtime.InteropServices;
/// <summary> /// APIFunctions 包含系统中对API的调用的类 /// </summary> public class APIFunctions { /// <summary> ...
- 2008-11-03 09:25
- 浏览 2553
- 评论(0)
C#
在字串左(或右)加空格或指定char字符,使字串达到指定长度,如: <% string str1="中国人"; str1=str1.PadLeft(10,'1'); //无第二参数为加空格 Response.Write(str1); //结果为“1111111中国人” , 字串长为10 %>
sql
方法1:
declare @a nvarchar(50), @b nvarchar(50)set @a = 'abcasdf'set @b = 'ab'select @a + space(20 - len(@a))select @b + ...
- 2008-10-23 20:48
- 浏览 8839
- 评论(0)
调用 存储过程 A
返回 1 a
2 b
3 c
在存储过程 B 中
可以用 表变量 或 临时表 来, 获取 存储过程 A 中返回的记录
如:
declare @tab table ( id int, Name nvarchar(50) )
insert into @tab exec 存储过程 A
-- 获取
select * from @tab
得到 1 a
2 b
3 ...
- 2008-10-18 11:16
- 浏览 1183
- 评论(0)
<script type="text/javascript"> function copy_code(copyText) { if (window.clipboardData) { window.clipboardData.setData("Text", copyText) } else { var flashcopier = 'flashcopier'; if(!document.getE ...
- 2008-10-17 22:18
- 浏览 1688
- 评论(2)
declare @temp table ( [id] int IDENTITY(1,1), [Name] varchar(10) ) declare @tempId int,@tempName varchar(10)
insert into @temp values('a') insert into @temp values('b') insert into @temp values('c') insert into @temp values('d') insert into @temp values('e')
WHILE EXISTS(select [id] from @tem ...
- 2008-10-16 18:50
- 浏览 2791
- 评论(0)
类文件代码:
using System;
using System.Web;
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { // 给委托注册一个方法,当调用委托的时候,该方法自动执行 Handler += new DemoHandler(_Default_Handler); }
protected void Button1_Click(object sender, Ev ...
- 2008-09-10 18:19
- 浏览 2188
- 评论(0)