declare @max integer,@id integer declare cur_rows cursor local for select Employee_No,count(*) from Employee group by Employee_No having count(*) > 1 open cur_rows fetch cur_rows into @id,@max whi... Read More
posted @ 2008-11-12 17:54 蛙蛙王子 Views(706) Comments(0) Diggs(0) Edit
declare @a float set @a=2261400270130.0 --select convert(decimal(20,1),@a) select convert(varchar(20),convert(decimal(20,1),@a)) Read More
posted @ 2008-11-12 14:36 蛙蛙王子 Views(544) Comments(1) Diggs(0) Edit
Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[proc_insert]') AND type... Read More
posted @ 2008-11-12 13:42 蛙蛙王子 Views(1304) Comments(2) Diggs(0) Edit
原来sql还有个stuff的函数,很强悍。 一个列的格式是单引号后面跟着4位的数字,比如’0003,’0120,’4333,我要转换成3,120,4333这样的格式,就是去掉单引号和前导的0,用以下语句就可以。 SELECT stuff(substring([当前组织],2,4),1,patindex('%[^0]%',substring([当前组织],2,4))-1,''),人员编码 FR... Read More
posted @ 2008-11-12 13:40 蛙蛙王子 Views(8050) Comments(0) Diggs(0) Edit
上次给大家演示了抓取IE内核浏览器的网页,这次和大家一起写一个抓取firefox页面文本的例子。Firefox有自身的一套结构良好的插件机制,但要深入开发Firefox插件的话要了解javascript,XUL,XPCOM以及一些c++的基本常识,本贴算是给想开发Firefox插件的朋友入门。 Read More
posted @ 2008-11-12 00:12 蛙蛙王子 Views(4715) Comments(17) Diggs(0) Edit