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

推荐订阅源

U
Unit 42
T
Threatpost
C
CERT Recently Published Vulnerability Notes
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
K
Kaspersky official blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Attack and Defense Labs
Attack and Defense Labs
N
News and Events Feed by Topic
Project Zero
Project Zero
H
Heimdal Security Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Know Your Adversary
Know Your Adversary
Google Online Security Blog
Google Online Security Blog
W
WeLiveSecurity
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Schneier on Security
Schneier on Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
News | PayPal Newsroom
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy
T
Threat Research - Cisco Blogs
Cloudbric
Cloudbric
V
Vulnerabilities – Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
S
Securelist
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
TaoSecurity Blog
TaoSecurity Blog
NISL@THU
NISL@THU
N
News and Events Feed by Topic
S
Security Affairs
The Last Watchdog
The Last Watchdog
T
Tor Project blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
The Exploit Database - CXSecurity.com
Simon Willison's Weblog
Simon Willison's Weblog
P
Palo Alto Networks Blog
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
C
Cisco Blogs
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
LINUX DO - 最新话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tenable Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security

博客园 - Jacky Xu

Office Excel Add-ins installation for AX 2012 and Dynamics AX 2012 clients reinstalltion Develop a Dynamics AX2012 Report by Visual Studio 2010 Codes Permission Management in AX 2012 Publish AX reports in AX2012 + SQL2008 Create a security policy in Dynamics AX2012 How to use a shared configuration file& Security configuration example in Dynamics AX 2012 Security management in Dynamics AX 2012 Dynamics AX2012 Installation& AOS (Cluster) configuration on Windows 7 Office 2007 Re-installed issue Delete printer sessions on Terminal server for users Launch AX2012 Virtual Machine Change Tracking -- SQL Server 2008 new feature FILESTREAM -- SQL Server2008 New Feature Don't use SQL keyword as your feild name of a table Reports development in Axapta 3 终端服务器许可问题 Can't access maintenance plan because Agent XPs component is turned off as part of the security configuration on sql2005 SQL Error log/Event ID(17890): A significant part of sql server process memory has been paged out. This may result.... command命令大全(转自http://blog.dhedu.gov.cn/u/72/archives/2009/14290.html)
记忆一些SQL语句
Jacky Xu · 2010-09-10 · via 博客园 - Jacky Xu

1, Select 50 unit unique records

select distinct  top 50 SalesId from salesline

2, Select total amount > 1500 records

select salesid,sum(amount) from salesline group by salesid having sum(amount)>1500

3, Define temporary table

create table #SalesCustom (UserName varchar(30), CustName varchar(30), EmpName varchar (30), Location varchar (30))

4, Insert data and join in

insert into #SalesCustom (UserName,CustName, EmpName, Location)

select CustName, salesid, EmpName, Location from salestable

inner join CustTable on salestable.custnumber= custtable.custnumber

inner join EmpTable on salestable.EmpId = EmpTable.EmpId

inner join Address on Address.Id = EmpTable.AddressId

5, sp_MSforeachtable: Check maximal RecId  in db on all tables (most tables has a RecId field)

create table #TT (tablename varchar(30), maxrecid int, minrecid int)
exec sp_MSforeachtable
      'insert into #TT select ''?'', max(recid),min(recid) from ? with(nolock)
select * from #TT order by maxecId desc
drop table #TT

6, update and datediff function

update #Issuehistory set #Issuehistory.Resolution = datediff(day,CreatedDate,CompletedDate),#Issuehistory.afield ='XXX' from #Issuehistory

7, exclusion weekday function

USE [DB_Name]
GO
/****** Object:  UserDefinedFunction [dbo].[DatePartWeekend]    Script Date: 09/10/2010 15:21:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create  function   [dbo].[DatePartWeekend](@BegTime   datetime,   @EndTime   datetime)
returns   int
as
begin
declare   @re   int
set   @re=0
while   @BegTime <=@EndTime
begin
select   @re=@re+1   where   (datepart(weekday,   @BegTime)+@@datefirst-1)%7   between   1   and   5
set   @BegTime=dateadd(day,   1,   @BegTime)
end

return   @re
end

8, 行列转换

Create table TT(part varchar(20), xu int )

插入

part      xu

a    null

a    null

a    null

a    null

b    null

b    null

b    null

c    null

执行:

select part,
xu=row_number() over(partition by part order by getdate())
from TT

结果:

a          1
a          2
a          3
a          4
b          1
b          2
b          3
c          1