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

推荐订阅源

WordPress大学
WordPress大学
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
月光博客
月光博客
V
Visual Studio Blog
T
Tailwind CSS Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
Recorded Future
Recorded Future
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
SecWiki News
SecWiki News
博客园 - Franky
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News | PayPal Newsroom
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cloudbric
Cloudbric
F
Full Disclosure
The Cloudflare Blog
Y
Y Combinator Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
S
Schneier on Security
Schneier on Security
Schneier on Security
Spread Privacy
Spread Privacy
L
LINUX DO - 热门话题
AI
AI
N
News and Events Feed by Topic
T
Tor Project blog
P
Palo Alto Networks Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog

博客园 - 迷路中的路人甲

sqlserver 创建 aspstate的方法 双网卡只有一个能ping通的解决办法 yum 快速安装 Rabbitmq for CentOS6 DataTable 2 Sql Table 强制删除TFS的签出文件办法 sqlserver 2005 查找对象引用或者依赖的存储过程。 js运算BUG doubanclaim7fc6594541441a59 Excel 导入数据库的问题 C# 执行存储过程返回小数的输出值的设置方法 IE 无法显示JPG格式图片 Jquery选择器 记录 - 迷路中的路人甲 - 博客园 TED 中文视频收集 Jquery 验证插件formValidator 一点问题。 Select在IE7中的一个bug,多个Select互相重叠的问题 Google wave 发送中..... 这是什么样子的天气呀。 Office 2010 Beta 安装成功 msn9强制更新(版本:14.0.8089.726)后的 2003下的解决办法 。
存储过程提示临时表字段不存在的解决办法--直接修改临时表的名称,用唯一值作为名称
迷路中的路人甲 · 2012-12-12 · via 博客园 - 迷路中的路人甲

存储过程提示临时表字段不存在的解决办法--直接修改临时表的名称,用唯一值作为名称

2012-12-12 15:09  迷路中的路人甲  阅读(1117)  评论(0)    收藏  举报

最近遇到一个问题。在存储过程中创建了一个临时表,但是使用的时候间歇性提示某一个字段不存在,例如:

Create Proc Test
as
select code,name into #tmp from Product where id>0
select * from #tmp where code = '20120105064'

go

 基本类似这个存储过程,在数据库里面执行的时候没有问题,但是在.net中执行,就会间歇性提示Code不存在。

最后查找发现,数据库会在执行之前验证结构,由于#tmp这个临时表在多个地方都有使用,导致验证时发现#TMP存在,并且结构和当前的不同。就会提示字段不存在。

解决办法很简单,用唯一名称做临时表名称,就可以解决了。