Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Friday, March 30, 2012

Inserting a Control Record into a Flat Text File through SSIS

I am working on an SSIS project where I create two flat files for submission to a data contractor. This contractor requires a control record be the first line in the file. I create the control record based on the table information being exported.

What I would like to know is, is it possible to utilize the Header Section of the Flat File Destination Editor to insert the control record? And, as it is dynamic, what kind of coding must I do in order to utlise this functionality?

Thanks.

Yes, I would guess that you can do exactly this using the header section.

You can set it dynamically by putting an expression on the [<Flat File Destination Name>].[Header] property of the parent data-flow task.

-Jamie

|||

Ok, I see that this can work, but looking at the available variables, functions for expressions, I do not see how I would get the data inserted from another text file (table) already created into this second one.

Truly not trying to be dense here, just "can't seem to see the forest for the trees."

Thanks.

|||

That's a bit of a different requirement. You may be hampered by the fact that the maximum length of the result of an expression can only be 4000 chars

The way to do it would probably be to build the text up programatically in a script task.

-Jamie

sql

Monday, March 26, 2012

Insert word file in SQL Server

Hi,
I try to save word files in SQL Server.
Can I do this?, How?
Thanks,
Try:
http://www.windowsitpro.com/SQLServe...903/37903.html
HTH
Jerry
"Office ortografa xp" <Officeortografaxp@.discussions.microsoft.com> wrote
in message news:697106EA-805F-49E4-924C-B195E462DD9C@.microsoft.com...
> Hi,
> I try to save word files in SQL Server.
> Can I do this?, How?
> Thanks,
>

Insert word file in SQL Server

Hi,
I try to save word files in SQL Server.
Can I do this?, How?
Thanks,Try:
http://www.windowsitpro.com/SQLServer/Article/ArticleID/37903/37903.html
HTH
Jerry
"Office ortografía xp" <Officeortografaxp@.discussions.microsoft.com> wrote
in message news:697106EA-805F-49E4-924C-B195E462DD9C@.microsoft.com...
> Hi,
> I try to save word files in SQL Server.
> Can I do this?, How?
> Thanks,
>

Insert word file in SQL Server

Hi,
I try to save word files in SQL Server.
Can I do this?, How?
Thanks,Try:
http://www.windowsitpro.com/SQLServ...7903/37903.html
HTH
Jerry
"Office ortografa xp" <Officeortografaxp@.discussions.microsoft.com> wrote
in message news:697106EA-805F-49E4-924C-B195E462DD9C@.microsoft.com...
> Hi,
> I try to save word files in SQL Server.
> Can I do this?, How?
> Thanks,
>sql

Wednesday, March 7, 2012

INSERT RECORD with PDF WOED files

Hi guys!

I've made a simple INSERT form write some records in a database...

then I need to associate to every record a PDF FILE or a WORD FILE..

so who (a user) insert a record should upload a file ...

How could associate the record to the file that an user upload?

classical article pubblication problem...do you know some tutorial?

3rdEyed

Hi 3rdEyed,

There are 2 ways that come to my mind in doing this.

1. Add a VarChar field in your table which stores the path and file name of the PDF or DOC file. You can later get this file from the file system and do whatever you like.

2. Use a FileStream to get file in a byte array. You can store the byte array in a binary field in database table.

I will recommend the first way, since it will not give much overhead to database.

|||

Kevin Yu - MSFT:

Hi 3rdEyed,

There are 2 ways that come to my mind in doing this.

1. Add a VarChar field in your table which stores the path and file name of the PDF or DOC file. You can later get this file from the file system and do whatever you like.

2. Use a FileStream to get file in a byte array. You can store the byte array in a binary field in database table.

I will recommend the first way, since it will not give much overhead to database.

Hi thanks for the answer..did you some example SCRIPT or TUTORIAL?