need guys. trying use following query data fom table. works in ssms , in ssis throws error.
select convert(varchar(10), getdate(), 120) col1 union select cast (customerid varchar) tcustomer union select cast(count(*) varchar) col1 tcustomer throwing error
[ole db source [1]] error: there error output column "col1" (35) on output "ole db source output" (11). column status returned was: "the value not converted because of potential loss of data.". what trying achieve
header line yyyy-mm-dd --e.g. 2013-07-01 data records trailer record ---e.g. 13480 where going wrong ?
the error see happens due data incompatibility.
in first convert(varchar(10) specify length 10
msdn says, default varchar size 30, doing cast(x varchar) equals cast(x varchar(30)). here have length of 30
and have column, length 20, , here have "potential loss of data"
Comments
Post a Comment