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

推荐订阅源

T
The Blog of Author Tim Ferriss
小众软件
小众软件
S
Schneier on Security
S
Securelist
P
Proofpoint News Feed
D
DataBreaches.Net
博客园_首页
S
Security Affairs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园 - Franky
C
Check Point Blog
GbyAI
GbyAI
H
Help Net Security
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
博客园 - 叶小钗
WordPress大学
WordPress大学
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
The Exploit Database - CXSecurity.com
L
LINUX DO - 热门话题
C
Cybersecurity and Infrastructure Security Agency CISA
SecWiki News
SecWiki News
T
Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tenable Blog
H
Hacker News: Front Page
宝玉的分享
宝玉的分享
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CERT Recently Published Vulnerability Notes
Google Online Security Blog
Google Online Security Blog
P
Privacy & Cybersecurity Law Blog
N
News | PayPal Newsroom
M
MIT News - Artificial intelligence
P
Privacy International News Feed
博客园 - 三生石上(FineUI控件)
美团技术团队
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
Last Week in AI
Last Week in AI
Spread Privacy
Spread Privacy
酷 壳 – CoolShell
酷 壳 – CoolShell
IT之家
IT之家
Cyberwarzone
Cyberwarzone
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
Engineering at Meta
Engineering at Meta

博客园 - 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