I am using a query in my OLE DB Source to pull a date and convert it into an integer smart date key in the format yyyymmdd. The code I am using as part of my query is
If I run the query in the Management Studio query window, it works fine. However, when I try to execute the package I get a fatal error: "Conversion failed because the data value overflowed the specified type".
Anyone have any ideas why it would work in MS but not as part of an OLE DB source?
Code:
case
when svc.InstallDate is Null then Null
else cast(convert(char(8), svc.InstallDate, 112) as int)
end
If I run the query in the Management Studio query window, it works fine. However, when I try to execute the package I get a fatal error: "Conversion failed because the data value overflowed the specified type".
Anyone have any ideas why it would work in MS but not as part of an OLE DB source?