Hello all,
I have a zip file that I need to "read" into a database table. Is it possible to read a zip file and capture the output in standard output? Or does it not work properly with zip files with special characters?
The way I have it setup now is with 2 tasks.
1) Read Task - read zip file
2) SQL Task - use SQL query to read the standard output from the previous task and insert the data into the database.
INSERT INTO AttachmentValue
SELECT TOP 1 AssetId, AssetTypeId, 'rptTEMADeduct', CAST('{TASK(86bae973-2c6f-40bf-9655-59d8830503f6,StdOut)}' AS VARBINARY(MAX)), 'TestVisualCronZIP.zip', 'application/zip', 1
FROM Asset
WHERE AssetId NOT IN(SELECT AssetId FROM AttachmentValue WHERE AttributeId = 'rptTEMADeduct')
AND AssetTypeId = 'PAY'
Step 1 runs fine, step 2 returns a bunch of "Incorrect syntax" errors.
Am I approaching this correctly, or would someone recommend a different method?
As a side note, instead of using a SQL task, I changed it to a write file, so I was trying to write the standard output from previous task (step 1). That ran fine, but the data in the output file was not right, seems like it had issues reading the special characters.
Thanks!