Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Date Conversion from SQL to a .csv file

$
0
0

We are doing an explicit conversion in our SQL Stored Procedure

CONVERT(VARCHAR, [#TempTable_Inventory_History].[ExpirationDate], 112) AS [Lot Expiry Date],

And within the SSIS Package and the Data Flow and the OLE DB Source

EXECUTE[Datapass].[InventoryExport846] ?

WITH RESULT SETS
(
(
[Lot Expiry Date]VARCHAR(8),...
)
)

The Metadata coming out of the OLE DB Source however is DT_DBDATE

Why? When I have explicitly converted to VARCHAR and 112 format and YYYYMMDD and have handled that within the EXECUTE WITH RESULT SETS

The data touch point is then extracting and creating to the .csv file as 2018-11-30

I think I even tried to do a Data Conversion within SSIS for this annoyance and that didn't work.

I just don't understand why.

Ok...I resolved it. I erroneously fir did RESULT SET as DATE...then changed it to VARCHAR(8). The Metedata NEVER updated. When I deleted the OLE DB Source and re-built it with RESULT SET VARCHAR(8) ...IT WORKED!!!

I guess the Metadata is not intelligent enough to refresh itself.

Stupid!


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>