惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Spread Privacy
Spread Privacy
S
Schneier on Security
博客园 - 【当耐特】
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
美团技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MongoDB | Blog
MongoDB | Blog
NISL@THU
NISL@THU
N
Netflix TechBlog - Medium
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
月光博客
月光博客
T
The Exploit Database - CXSecurity.com
Forbes - Security
Forbes - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 叶小钗
Recent Announcements
Recent Announcements
IT之家
IT之家
B
Blog
C
CERT Recently Published Vulnerability Notes
S
SegmentFault 最新的问题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
Know Your Adversary
Know Your Adversary
Security Latest
Security Latest
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Troy Hunt's Blog
O
OpenAI News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
V2EX - 技术
V2EX - 技术
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
H
Help Net Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Last Week in AI
Last Week in AI
Help Net Security
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
A
About on SuperTechFans
Y
Y Combinator Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Engineering at Meta
Engineering at Meta
T
Threat Research - Cisco Blogs
Vercel News
Vercel News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Recorded Future
Recorded Future
C
Cisco Blogs
Project Zero
Project Zero

博客园 - zhengfeng

GridView 72般绝技 链接打开固定大小的新窗口 iframe传值和自适应高度 页面传参 小技巧 js表单验证控制代码大全 - zhengfeng - 博客园 自己写的递归方法复制文件夹里面的内容(从源文件(里面可以有多个层次的子文件夹)到一个文件夹) 递归写的复制文件夹及其下的内容(原样复制) JS取得URL中的参数值 自己写的将文件从多个文件合并到一个文件夹的小方法 使用 Hashtable 集合(一) MessageBox.Show用法 System.IO.File类和System.IO.FileInfo类 Math.floor和Math.ceil函数 Document对象 javascript小技巧 JavaScript的学习 正则表达式的学习: DataList分页
工作小结:
zhengfeng · 2007-06-26 · via 博客园 - zhengfeng

1.EXCEL中的函数:
=CONCATENATE("INSERT INTO  [SnatchDB].[dbo].[Snatch_Mission]([F_ID],[MissionName],[BeginURL],[NewsLabel]) VALUES(",Y2,",'",D2,"','",E2,"','",C2,"'",")")
2.SQL2005中清空日志的方法:
第一步: 先备份整个数据库以备不测
第二步: 备份结束后,在Query Analyzer中执行如下的语句: exec sp_detach_db yourDBName,true --卸除这个DB在MSSQL中的注册信息
第三步: 到日志的物理文件所在的目录中去删除该日志文件或者将该日志文件移出该目录
第四步: 在Query Analyzer中执行如下的语句: exec sp_attach_single_file_db yourDBName,'d:\mssql7\data\yourDBName_data.mdf' -- 以单文件的方式注册该DB,如果成功则MSSQL将自动为这个DB生成一个500K的日志文件
3.datalist奇偶行替换显示颜色,
       if (e.Row.RowType == DataControlRowType.DataRow)//判定当前的行是否属于datarow类型的行
         {
             //当鼠标放上去的时候 先保存当前行的背景颜色 并给附一颜色
             e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#d3d3d3',this.style.fontWeight='';");
             //当鼠标离开的时候 将背景颜色还原的以前的颜色
             e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor,this.style.fontWeight='';");
         }
         //单击行改变行背景颜色
         if (e.Row.RowType == DataControlRowType.DataRow)
         {
             e.Row.Attributes.Add("onclick", "this.style.backgroundColor='Burlywood'; this.style.color='buttontext';this.style.cursor='default';");
         }
4.把A表中的categoryID改换为B表中的newcategoryID:
    update A set A.categoryID=B.newcategoryID from A join B on A.categoryid=B.oldCategoryid
5.有A,B两表,A表中字段TYPE(产品型号),B表中有字段P_NAME(产品名称,名称中包含产品型号),现将两个字段like查询,找出P_NAME中包含的型号,把A表中相对应的ID写入B表中的P_ID中:
update B
set P_ID=A.ID
from B,A
where charindex(A.TYPE,B.P_NAME)>0      ( 用charindex函数判断type是否在p_name中where charindex(a.type1,b.p_name)>0)

update b set pid=(select id from a where b.p_name like '%'+a.type+'%')

6.

两个表相联接查询,A表和B表,A表中有categoryID,B表中有oldcategoryID,现在的做法是从A表中找到其categoryID与B表中oldcategoryID不一样的数据!并按A表中的categoryID分组,并去除重复的categoryID.也就是每个categoryID的分类只显示一条:
SELECT categoryID FROM A
WHERE NOT EXISTS(SELECT 1 FROM B WHERE A.categoryID=B.oldcategoryID)
GROUP BY categoryID