Showing posts with label excel. Show all posts
Showing posts with label excel. Show all posts

Monday, March 26, 2012

multi excel files to sql server

I am following the instruction in
http://www.sqldts.com/default.aspx?6,103,246,0,1 to loop thru a directory an
d
get multi excel files to sql.
excel files: same layout, in the same folder and going to the same sql table
I am using the transform data task for excel -> sql step. the problem is
that the package can only process the first file (the initial that I use to
setup the excel connection). The package dies on the 2nd file. I can see the
2nd file being pickup by the loop because the correct file name is in the
excel connection property and the global variable is updated to reference th
e
2nd file as well.
When I goto the transform data task properties and preview source, I get an
error. Error Source: Microsoft JET Database Engine.
Error Description: 'xxx$' is not a valid name. Make sure that it does not
include invalid characters or punctuation and that it is not too long
the file names are not too long. I changed it to be a.xls, b.xls, c.xls etc.
so what's wrong?a bit more info:
I noticed that there were always two selections (2 xxx$) in the transform
data task properties -> table/view dropdown. the one selected by default is
always wrong. I have to select the other one and re-do the transformation
then the whole thing would work again... but only once on one file..... I
would error back here again on the 2nd file...
How can I make the package see the correct file in the table/view dropdown'
"christy" wrote:

> I am following the instruction in
> http://www.sqldts.com/default.aspx?6,103,246,0,1 to loop thru a directory
and
> get multi excel files to sql.
> excel files: same layout, in the same folder and going to the same sql tab
le
> I am using the transform data task for excel -> sql step. the problem is
> that the package can only process the first file (the initial that I use t
o
> setup the excel connection). The package dies on the 2nd file. I can see t
he
> 2nd file being pickup by the loop because the correct file name is in the
> excel connection property and the global variable is updated to reference
the
> 2nd file as well.
> When I goto the transform data task properties and preview source, I get a
n
> error. Error Source: Microsoft JET Database Engine.
> Error Description: 'xxx$' is not a valid name. Make sure that it does not
> include invalid characters or punctuation and that it is not too long
> the file names are not too long. I changed it to be a.xls, b.xls, c.xls et
c.
> so what's wrong?

Monday, February 20, 2012

MSSQL Select commands to FTP

Hello,

Im new to Sql Server Integration Services.

I need to get the data I get from my SQL Select statement into TXT, XML, CSV or Excel file format and then send it with FTP.

What is the easiest method that you recommend that I use?

Thank you very much!!

Data flow to select your records using an OLE DB source. Send those records to a text file (or csv) using the flat file destination.

Then in the control flow, use the FTP task to send that file.|||

Thank you very much for the reply.

I know this sounds simple, but do you know any tutorial out there that shows how to do this?

Thanks again in advance.

|||Try looking through the SSIS tutorials. What you need is pretty basic stuff.

http://msdn2.microsoft.com/en-us/library/ms167031.aspx|||

Thank you so much.

I have one complexity though.

My SSIS flow is gonna be run every day as a sceduled task.

The first time it runs, it has to send a History (Select Statement 1) but every day after that it just has to get the latest info (Select Statement 2).

How do I do this?

Thank you very much in advance!!