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

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - ypq

cxGrid让指定的某行自动呈选选中的状态 VMware Esxi5.5中嵌套虚拟机的网络设置方法 SQLServer (2005/2008) 日志清理方法 控制cxGrid 主从表的明细只展开一个 关于Delphi cxGrid主从表中从表只能编辑第一条记录的问题 关于cxGrid选中行操作关联数据集的一种方法 安全释放 TreeView的DATA! delphi中遍历枚举类型的方法 oracle临时表的两种方式 关于PLSQL的存储过程参数 创建variant二维数组 数据库表行转列,列转行终极方案(转) kav 优化设置(转) - ypq - 博客园 [转载]oracle备份与恢复精华资料 ASP.NET学习线路(转) MS-SQLSERVER--错用了LEN()函数 反向解析(PTR)(转): 域名”A记录,MX记录,CNAME记录,TTL值,URL转发”解释 开博了!
行字段值拼接成字符串
ypq · 2012-09-21 · via 博客园 - ypq

 1 WITH    SizingJob ( SizeBatchNo, BatchNo )
 2           AS ( SELECT   b.SizeBatchNo ,
 3                         b.BatchNo
 4                FROM     WVMDB.dbo.wvSizingBatchInfo a WITH ( NOLOCK )
 5                         LEFT JOIN ydmdb.dbo.ydbeambatchno_sizing b WITH ( NOLOCK ) ON a.Sizing_Batch_NO = b.SizeBatchNo
 6                WHERE    a.End_Time IS NULL
 7              )
 8     SELECT  SizeBatchNo ,
 9             CASE WHEN LEN(SizingDyeBatchs) > 0
10                  THEN STUFF(SizingDyeBatchs, LEN(SizingDyeBatchs), 1'')
11                  ELSE ''
12             END AS SizingDyeBatchs
13     FROM    ( SELECT DISTINCT
14                         SizeBatchNo
15               FROM      SizingJob
16             ) a
17             CROSS APPLY ( SELECT    SizingDyeBatchs = ( SELECT
18                                                               BatchNo + '/'
19                                                         FROM  SizingJob
20                                                         WHERE SizeBatchNo = A.SizeBatchNo
21                           FOR       XML PATH('') ,
22                                         TYPE
23             ).value('/''nvarchar(max)')
24

 1 WITH    SizingJob ( SizeBatchNo, BatchNo )
 2           AS ( SELECT   b.SizeBatchNo ,
 3                         b.BatchNo
 4                FROM     WVMDB.dbo.wvSizingBatchInfo a WITH ( NOLOCK )
 5                         LEFT JOIN ydmdb.dbo.ydbeambatchno_sizing b WITH ( NOLOCK ) ON a.Sizing_Batch_NO = b.SizeBatchNo
 6                WHERE    a.End_Time IS NULL
 7              )
 8     SELECT  SizeBatchNo ,
 9             CASE WHEN LEN(SizingDyeBatchs) > 0
10                  THEN STUFF(SizingDyeBatchs, LEN(SizingDyeBatchs), 1'')
11                  ELSE ''
12             END AS SizingDyeBatchs
13     FROM    ( SELECT DISTINCT
14                         SizeBatchNo
15               FROM      SizingJob
16             ) a
17             CROSS APPLY ( SELECT    SizingDyeBatchs = ( SELECT
18                                                               BatchNo + '/'
19                                                         FROM  SizingJob
20                                                         WHERE SizeBatchNo = A.SizeBatchNo
21                           FOR       XML PATH('') ,
22                                         TYPE
23             ).value('/''nvarchar(max)')
24                         ) b