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

推荐订阅源

D
Docker
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
量子位
T
Tailwind CSS Blog
T
Threatpost
The GitHub Blog
The GitHub Blog
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
K
Kaspersky official blog
P
Proofpoint News Feed
博客园 - 司徒正美
L
LangChain Blog
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
S
Secure Thoughts
The Last Watchdog
The Last Watchdog
Spread Privacy
Spread Privacy
H
Hacker News: Front Page
T
Troy Hunt's Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
T
Tor Project blog
T
The Blog of Author Tim Ferriss
I
Intezer
P
Privacy & Cybersecurity Law Blog
美团技术团队
N
Netflix TechBlog - Medium
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
Attack and Defense Labs
Attack and Defense Labs
T
Tenable Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Last Week in AI
Last Week in AI

博客园 - 破曉之陽

SQL 查找某年某月的天数 SQL操作全集 创建触发器和使用示例(于海涛 老师的实验课) 因为没工作了。所以的复习一下以前的东西。好去面试 SQL Server性能优化 应用Profiler优化SQL Server数据库系统 SQL CASE - 破曉之陽 - 博客园 SQL EXISTS - 破曉之陽 - 博客园 SQL 刪除相同的記錄 80048820 - 破曉之陽 - 博客园 奇怪的问题。 - 破曉之陽 - 博客园 如何在 Windows 2000 中提升和降级域控制器 Microsoft.Exchange.OMA.PreferencingServerResources.Resources.dll.EN 指定的網域的名稱或安全性識別碼(用磁碟映像檔部署的電腦無法加入AD網域 ) Microsoft.NET框架程序设计(修订版) 下载地址 将这个字段中所有含‘北京’的替换成'上海' 电脑自动重启 演练:使用受保护的配置加密配置信息 vs c#2005 web编程中的.cs文件为什么都没有namespace?
SQL left,RIGHT,CHARINDEX 使用示例
破曉之陽 · 2008-04-26 · via 博客园 - 破曉之陽

問:
表結構:
name       company    company_address      url1                
---------- ---------- -------------------- --------------------
Joe        ABC        Work   Lane          abc.com;xyz.com
Jill       XYZ        Job   Street         abc.com;xyz.com
寫一個存儲過程等到如下的結果:
name       company    company_address      url1                
---------- ---------- -------------------- --------------------
Jill       XYZ        Job   Street         abc.com
Jill       XYZ        Job   Street         xyz.com
Joe        ABC        Work   Lane          xyz.com
Joe        ABC        Work   Lane          abc.com
答:

drop   table   users1
go
create   table   users1   (name   varchar(10),company   varchar(10),company_address   varchar(20),url1   varchar(20))
insert   into   users1
select   'Joe ''ABC ''Work   Lane ''abc.com;xyz.com '
union   all   select   'Jill ''XYZ ''Job   Street ''abc.com;xyz.com '
drop   proc   up_test
go
create   proc   up_test
as
if   exists(select   1   from   sysobjects   where   type= ''   and   name= 'users2 ')
drop   table   users2
select   *   into   users2  
from   (
select  [name],company,company_address,left(url1,charindex';',url1)-1)   as   url1
from   users1
union   all
select   [name],company,company_address,right(url1,len(url1)-charindex';',url1)+1)  as   url1
from   users1) t
order   by   t.name,t.company,t.company_address
GO
exec   up_test
select   *   from   users2