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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
Engineering at Meta
Engineering at Meta
量子位
A
About on SuperTechFans
阮一峰的网络日志
阮一峰的网络日志
Recent Announcements
Recent Announcements
博客园 - 司徒正美
V
Visual Studio Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
腾讯CDC
Jina AI
Jina AI
C
Check Point Blog
H
Help Net Security
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
爱范儿
爱范儿
I
InfoQ

博客园 - skyfei

Xcode 文档注释方法 查看iOS模拟器应用的沙箱文件 Show in Finder OC代码 C# x86应用x64系统上读取x64位应用的注册表 Make webclient support upload the large file which are larger than 1G Shortcut key for WPF get Android information with adb, the build version Decodes a QuotedPrintable encoded string C# USB Detection - winform and WPF [转] 线程同步 C# 常见面试题(2) 转:C# Interview Questions Openxml: 导出excel 设置 cell的格式 - skyfei OpenXML: excel 插入BarChart图表 OpenXML: Asp.net利用OpenXML 导出Excel. TRIGGERS :Cannot use text, ntext, or image columns in the 'inserted' and ' deleted' tables. .net Create Excel 2007 file with open xml 利用.Net Framework2.0 zip压缩、解压 string 数据 C#中文和UNICODE字符转换方法 - skyfei - 博客园
'String or binary data would be truncated' error message
skyfei · 2008-11-18 · via 博客园 - skyfei

很多人(在google)上遇到这个错误是由于数据的存储空间小于 要插入的数据。 而我遇到这个错误却是由于, column 的顺序没有排对,

我是用 insert <tableName> select * from <tablename> 和delete from <tablename> output  deleted.* into 时出错。由于select 或者delete选择的column Name 是手动排的, 和要insert 的table column顺序不一致,景观column name 都一样但还是抛出了标题的错误,更正  用的顺序是sql server management 显示的顺序, 错误排除。

delete  top (1) from s
output
            DELETED.[RatingTime]
           ,DELETED.[Comment]
           ,DELETED.[LCID]
           ,dbo.Get_LCIDNAME(DELETED.LCID) as [LCIDName]
           ,DELETED.[AssetID]
           ,a.[Title] as [Asset_Title]
           ,a.[Category]as [Asset_Category]
           ,a.[AppCode]as [Asset_Code]
           ,a.[Writer]as [Asset_Writer]
           ,a.[Editor]as [Asset_Editor]
           ,case a.LCID when null then null else dbo.get_LCIDName(a.LCID)end as [Asset_LCIDName]
           ,a.[UpToDate]as [Asset_UpToDate]
           ,a.[Provider]as [Asset_Provider]
           ,a.[WLCID]as [Asset_WLCID]
           ,a.[Byline]as [Asset_Byline]
           ,a.[TrustLevel]as [Asset_TrustLevel]
           ,a.[AppVer]as [Asset_AppVer]
    INTO OfficeOnline.dbo.tblCompliments
FROM   tblCompliments as s
    left join AssetList as a  on s.AssetID = a.AssetID