显示标签为“execute”的博文。显示所有博文
显示标签为“execute”的博文。显示所有博文

2012年3月26日星期一

flatfilesource(s) in a loop

I am trying to design a package to import the data of several .tx files into a table in sql server.

1) I created an execute task that truncates the sql server table i.e. truncate table tblContacts

2)
Placed a forrloop container with enumerator: foreach file enumerator
Folder points to the folder that holds the txt files
file: *.*
filename: fully qualified
variablemapping: User::FileName with Index 0

3)
placed a data flow task inside the forloop
this dataflow task has the following dataflow:
FlatFile Source: connection manager is pointing to one of the txt files
OLE DB Destination to place the txt data into tblContact in the database.

The question:
when the package is run, the tblContact gets populated only from the first txt file, i.e. the one which I placed in the flatfilesource connection manager.
How can I allow several files in the flatfilesource, instead of the one I have now...

Thanks

Firstly, in your For Each Loop, you could change filter from *.* to *.tx (not essential)

You need to make the connectionstring variable (ConnectionString is a property of your FlatFile connection Manager )

Click on your FlatFile Connection Manager (this is at the bottom of the BIDS screen).

Go to the properties of the CM, I mean the properties window that appears on the right of your screen.

Expand the Expressions property collection, and drill through to get the Property Expressions editor.

Choose property ConnectionString, and drill through the expression to get the Expression Builder.

Drag your variable (FileName) and drop it into the Expression box. I assume the FileName variable contains the entire file path and name.

Now it should work fine.

2012年3月7日星期三

first()

Hi all

I'm trying to do some calculations using java.....when I execute my query and want to ensure that I am at the first row I'm using ResultSet.first()...but that gives me an "Unsupported method"-error.

I've tried ResultSet.absolute(1) as well - with the same result unfortunately :(

Does anybody know what I'm doing wrong ??

Thanks

KimDid you make your resultset scrollable ?|||That looks more like vb than java...

http://java.sun.com/docs/books/tutorial/index.html|||Nope - its java.

2012年2月26日星期日

First CTP and spatial

I just download and install first CTP. When I execute query

Code Snippet

select * from sys.types

i don't see any spatial data types?

May be i do something wrong? Or spatial unsupported in first CTP?

Spatial data feature is not included in the June CTP. The demo at Tech-Ed is based on a non-CTP build.

Hope this helps!

Changqing|||

>>Or spatial unsupported in first CTP?

No, this is not available in the first CTP. For a list of features in the CTP, open Books Online and search for " What's New". There's a What's New (Database Engine), What's New (Reporting Services), etc. topic for each SQL Server component that describes the new features available in the CTP with links to the relevant topics.

Regards,

Gail

|||Can you give us a time estimate when this WILL be included ;-)|||I've seen a similar question here already, and the correct answer is: When it's finished. Microsoft develop using a different strategy now, they include features when they seem to be ready for the market, so as far as I've understood the situation no new features are officially scheduled for a specific release or a specific date.|||

The spatial functionality I demo'ed at TechEd is not part of CTP3 or the upcoming CTP4. We cannot give an official delivery date yet, but we hope to have it available after CTP4. ;-)

Best regards

Michael

First CTP and spatial

I just download and install first CTP. When I execute query

Code Snippet

select * from sys.types

i don't see any spatial data types?

May be i do something wrong? Or spatial unsupported in first CTP?

Spatial data feature is not included in the June CTP. The demo at Tech-Ed is based on a non-CTP build.

Hope this helps!

Changqing|||

>>Or spatial unsupported in first CTP?

No, this is not available in the first CTP. For a list of features in the CTP, open Books Online and search for " What's New". There's a What's New (Database Engine), What's New (Reporting Services), etc. topic for each SQL Server component that describes the new features available in the CTP with links to the relevant topics.

Regards,

Gail

|||Can you give us a time estimate when this WILL be included ;-)|||I've seen a similar question here already, and the correct answer is: When it's finished. Microsoft develop using a different strategy now, they include features when they seem to be ready for the market, so as far as I've understood the situation no new features are officially scheduled for a specific release or a specific date.|||

The spatial functionality I demo'ed at TechEd is not part of CTP3 or the upcoming CTP4. We cannot give an official delivery date yet, but we hope to have it available after CTP4. ;-)

Best regards

Michael