all groups > sql server dts > july 2007 >
You're in the

sql server dts

group:

SSIS Packages


SSIS Packages S
7/16/2007 10:08:33 AM
sql server dts:
It seems to me that SSIS packages changed creately fromt he DTS that I
used to know.

So my question will seem rather simple.

How do I get a variable into an sql query that transfer data from 1
database to another.

Old Query would be:

Select FirstName, LastName FROM Person WHERE Location = ?

Now I created a DataReader Source on the Data Flow tab and a variable
called Location and set it = 10

But I cannot get the variable into the DataReader Source on the Data
Flow tab.

I have it all setup to execute without a variable but when I try to
take it to the next level by paramterizing it I get an error.

I have to elements setup
DataReader Source
and OLE DB Destination element

I have them linked together and the plan is that once a week I go out
to the production database get the row I need for processing. Process
x number of hours then return the result set back the the production
database. Very simple in DTS.

Can anyone help am I way off
Re: SSIS Packages Allan Mitchell
7/17/2007 6:42:27 AM
Hello S,

Why are you using a DataReader Source?

With an OLEDB Source your query will not change.

You can also look to use Property Expressions as the SqlCommand property
of the Data Reader Source is exposed through its parent data Flow task.



--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

Re: SSIS Packages S
7/18/2007 9:58:06 AM
[quoted text, click to view]

My Query Will change becuase the Location could change what is
happening is I am off loading a large process to another server
churning the data and then returning the process back to the central
server.

The loction could change per server currently we have 3 different
loation so this batch process will be on 3 different servers we sign
another contract and we would end up with 4th server.

So the question is still valid in DTS I used to be able to set a
paramter in the global parameters area and apply it to any sp or query
string by using a question mark. Can I do that in SSIS and if so how.

Re: SSIS Packages Allan Mitchell
7/19/2007 12:00:00 AM
Hello S,

I never suggested your question was not valid. Your requirement is common
and easily accomplished.

Your query using the OLE DB Source Adapter can remain the same (using ? as
a placeholder for the parameter)

You can also look at both Configurations and Property Expressions in SSIS
to pass in or configure properties of the package at runtime.

--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

AddThis Social Bookmark Button