无法将类型为“System.Decimal”的对象强制转换为类型“System.Char[]”。
在用微软的SSIS操作ORACLE 数据源的时候碰到以下报错信息:
[ADO NET Destination [13455]] 错误: 数据插入期间出现异常,从提供程序返回的消息为:无法将类型为“System.Decimal”的对象强制转换为类型“System.Char[]”。
SQL语句:
select A FROM TABLE WHERE B ....
字段A为NUMBER类型,但是数据库中有空值,所以报错,只是报错信息不标准
SQL改为
SELECT
case when A is not null then A ELSE 0 END AS A
FROM TABLE B WHERE ...
改完就不报错了,说白了就是加个判断。
无法将类型为“System.Decimal”的对象强制转换为类型“System.Char[]”。的更多相关文章
- Web Service接口返回泛型的问题(System.InvalidCastException: 无法将类型为“System.Collections.Generic.List`1[System.String]”的对象强制转换为类型“System.String[]”)
在使用C#写Web Service时遇到了个很奇怪的问题.返回值的类型是泛型(我用的是类似List<string>)的接口,测试时发现总是报什么无法转换为对象的错误,百思不得其解. 后来在 ...
- 无法将类型为“System.DBNull”的对象强制转换为类型“System.String”
在ERP中做业务类单据,有时候会遇到这样的报错. 无法将类型为"System.DBNull"的对象强制转换为类型"System.String" 去数据库中检 ...
- 如何解决”无法将类型为“System.DateTime”的对象强制转换为类型“System.String”。“
字段Time在数据库中为datetime类型 dr.GetString(3).ToString() dr.GetString(3).ToString() => dr.GetDateTime(3) ...
- c#:无法将类型为“System.DBNull”的对象强制转换为类型“System.String”
解决办法: 使用转换函数即可: Convert.ToString(要转换的值);
- 无法将类型为“System.Windows.Controls.SelectedItemCollection”的对象强制转换为类型“System.Collections.Generic.IList`1
在WPF中DataGrid 选择事件中获取SelectedItems 报错如下 无法将类型为“System.Windows.Controls.SelectedItemCollection”的对象强制转 ...
- 【Winform】 无法将类型为“System.Windows.Forms.SplitContainer”的对象强制转换为类型“System.ComponentModel.ISupportInitialize”。
问题:将dotnet framework 4.0 切换到2.0时,编译没有问题,在运行时出现如下错误:System.InvalidCastException: 无法将类型为“System.Window ...
- 将DataTable转换为List<T>对象遇到问题:类型“System.Int64”的对象无法转换为类型“System.Int32”。
可以利用反射将DataTable转换为List<T>对象:原始链接http://www.jb51.net/article/67386.htm 但是该方法在DataTable里某个字段类型是 ...
- WPF System.InvalidCastException: 无法将类型为“System.Windows.Media.Color”的对象强制转换为类型“System.Windows.Media.Brush”。
场景:添加ComboBox样式,界面卡死,日志异常文件如下: -- ::, | ERROR | System.InvalidCastException: 无法将类型为“System.Windows.M ...
- 保存图片控件上的图片到本地 出现错误:无法将类型为“System.Windows.Media.Imaging.BitmapFrameDecode”的对象强制转换为类型“System.Windows.Media.Imaging.BitmapImage”。
保存图片控件上的图片到本地 出现错误:无法将类型为“System.Windows.Media.Imaging.BitmapFrameDecode”的对象强制转换为类型“System.Windows.M ...
随机推荐
- iconv将文件编码从gb2312 转换为utf-8
iconv命令用于转换指定文件的编码,默认输出到标准输出设备,亦可指定输出文件. 用法: iconv [选项...] [文件...] 有如下选项可用: 输入/输出格式规范:-f, --from-cod ...
- Textrank算法介绍
先说一下自动文摘的方法.自动文摘(Automatic Summarization)的方法主要有两种:Extraction和Abstraction.其中Extraction是抽取式自动文摘方法,通过提取 ...
- JS编写背景图切换
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8&qu ...
- EXTJS4自学手册——EXT基本方法、属性(mixins多继承、statics、require)
1.mixins 说明:类似于面向对象中的多继承 <script type="text/javascript"> Ext.onReady(function () {// ...
- 一个简单的makefile
#common makefile header LOCAL_INCLUDE := \ -I/xxx/ACE/ACE/ LOCAL_FLAGS := $(LOCAL_INCLUDE) LIBS := - ...
- centos查看系统cpu个数、核心书、线程数
1.查看物理cpu个数 grep 'physical id' /proc/cpuinfo | sort -u | wc -l 2.查看核心数量 grep 'core id' /proc/cpuinfo ...
- c# DESEncrypt 加密、解密算法
using System; using System.Security.Cryptography; using System.Text; namespace AttendService { publi ...
- JAVA XML
为什么要用XML:1各平台之间程序很难直接交流 2各程序之间交换数据 xml定义 可扩展标记语言,标准通用标记语言的子集,一种用于标记电子文件使其具有结构性的标记语言. 它可以用来标记数据.定义数据 ...
- About memories in ASIC FPGA
1. Write first | Read First | No Change区别在于:en & wr的时候,dout是什么,三种case对应于: dout = din; dout = mem ...
- intelj对我来说比较常用的快捷键
文件查找 CTRL+N 查找类 CTRL+SHIFT+N 查找文件 CTRL+SHIFT+ALT+N 查找类中的方法或变量 CTRL+ALT+B 找所有的子类 CTRL+G 定位行 CTR ...