Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ggarza75
Yak Posting Veteran
50 Posts |
Posted - 2009-06-26 : 16:51:09
|
Need some assistance please.I have a DTS package with two Connections and three Transform Data Tasks going from Connection 1 to Connection 2. So all this is doing is exporting data from database 1 to database 2.Each Transform has a Select statement that looks like this:Transform 1Select * From Table1Where objid = 10001628Transform 2Select * From Table2Where EmpClientRate2Client = 10001628Transform 3Select * From Table3Where Timecard2Client = 10001628This is all great when I want to export data that has an object ID of 10001628. This means if I want to transfer data for a different client, I would need to change the 10001628 to another number for each Transform Task manually.How can I make this DTS automatically fill in the WHERE clause with the object ID of my choosing without having to go into each Transform and changing the number manually?Hope this was clear and thanks for any assistance. |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-06-26 : 17:57:54
|
Using global package variables.To create a global variable right click on the DTS Package and select “Package Properties” and select “Global Variables” tab. Click on the “New” button to create a new global variable.Then you can use:where objid = ?where EmpClientRate2Client = ?...in Transform Data TaskThis will guide you if you can take the time to read...http://www.sqlservercentral.com/articles/DTS/overviewofdtspackages/2127/ No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-27 : 01:55:59
|
also seehttp://www.sqldts.com/234.aspx |
|
|
ggarza75
Yak Posting Veteran
50 Posts |
Posted - 2009-06-29 : 10:41:29
|
Thanks guys, these are great helpful tips. This is what I was looking for. |
|
|
ggarza75
Yak Posting Veteran
50 Posts |
Posted - 2009-06-29 : 13:49:09
|
Sweet. I got the GV part down. I was able to create a variable with a specific value. The records were transfered and deleted from the source.This works great when I specify a specific number in the VALUE field. My next question is this, how can I make the VALUE field accept any number of my choosing without having to go into the DTS properties?Thanks. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-29 : 13:56:40
|
you can do that by means of dynamic properties taskhttp://www.virtualobjectives.com.au/sqlserver/dts_activex_task.htm |
|
|
cengaver
Starting Member
34 Posts |
Posted - 2009-07-08 : 06:17:38
|
i need a sql program that makes data transfer to excel from sql and after transfering it will send mail finally delete file of excel.at least if you have documants about it please send me..my email adress is omer_yalcin1985@hotmail.comi am waiting oyur helps..thanks |
|
|
cengaver
Starting Member
34 Posts |
Posted - 2009-07-08 : 06:17:39
|
i need a sql program that makes data transfer to excel from sql and after transfering it will send mail finally delete file of excel.at least if you have documants about it please send me..my email adress is omer_yalcin1985@hotmail.comi am waiting oyur helps..thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-07-08 : 13:03:44
|
quote: Originally posted by cengaver i need a sql program that makes data transfer to excel from sql and after transfering it will send mail finally delete file of excel.at least if you have documants about it please send me..my email adress is omer_yalcin1985@hotmail.comi am waiting oyur helps..thanks
dont hijack threads. post this as a new thread please |
|
|
|
|
|