![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
We would like to update the Customer Table in Northwind database with DTS (As a testing). We have created a DTS as follow but it doesn't run successfully. Is there anything wrong ? Function Main() DTSDestination("ContactName") = DTSSource ("ContactName") DTSDestination("CustomerID") = DTSSource ("CustomerID") Main = DTSTransformStat_UpdateQuery End Function |
#3
| |||
| |||
|
|
-----Original Message----- OK You have not mentioned 1. Errors 2. Tasks Used 3. Version of SQL Server 4. With what you want to update the table You could simply use the ExecuteSQL task to do updates. The syntax you are using requires the Data Driven Query Task which usually decides its hoice of query from a flag in the source data. If you are using the DDQ, have you set up your queries? -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Paul" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:2f43f01c46d28$f8f60a50$a501280a (AT) phx (DOT) gbl... We would like to update the Customer Table in Northwind database with DTS (As a testing). We have created a DTS as follow but it doesn't run successfully. Is there anything wrong ? Function Main() DTSDestination("ContactName") = DTSSource ("ContactName") DTSDestination("CustomerID") = DTSSource ("CustomerID") Main = DTSTransformStat_UpdateQuery End Function . |
#4
| |||
| |||
|
|
Dear Allan, I am new to DTS and don't know Data Driven Query at all. We have exported a couple of columns from a table. After manuplination, we have to update the table with the changed data. We are using SQL Server 2000 SP3. We want to update 3 columns + key of the table. There is no query being prepared. Thanks -----Original Message----- OK You have not mentioned 1. Errors 2. Tasks Used 3. Version of SQL Server 4. With what you want to update the table You could simply use the ExecuteSQL task to do updates. The syntax you are using requires the Data Driven Query Task which usually decides its hoice of query from a flag in the source data. If you are using the DDQ, have you set up your queries? -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Paul" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:2f43f01c46d28$f8f60a50$a501280a (AT) phx (DOT) gbl... We would like to update the Customer Table in Northwind database with DTS (As a testing). We have created a DTS as follow but it doesn't run successfully. Is there anything wrong ? Function Main() DTSDestination("ContactName") = DTSSource ("ContactName") DTSDestination("CustomerID") = DTSSource ("CustomerID") Main = DTSTransformStat_UpdateQuery End Function . |
#5
| |||
| |||
|
|
-----Original Message----- One of the easiest ways to do this is to import your data into a staging table and then issue TSQL against the tables. The DDQ is not complex but it does take a bit of working out. Is this X Server or same server. If == same server then you could simply use 3 part naming and do your updates. What is the source of your data? -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Paul" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:2fc0e01c46d56$c2aeb0e0$a301280a (AT) phx (DOT) gbl... Dear Allan, I am new to DTS and don't know Data Driven Query at all. We have exported a couple of columns from a table. After manuplination, we have to update the table with the changed data. We are using SQL Server 2000 SP3. We want to update 3 columns + key of the table. There is no query being prepared. Thanks -----Original Message----- OK You have not mentioned 1. Errors 2. Tasks Used 3. Version of SQL Server 4. With what you want to update the table You could simply use the ExecuteSQL task to do updates. The syntax you are using requires the Data Driven Query Task which usually decides its hoice of query from a flag in the source data. If you are using the DDQ, have you set up your queries? -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Paul" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:2f43f01c46d28$f8f60a50$a501280a (AT) phx (DOT) gbl... We would like to update the Customer Table in Northwind database with DTS (As a testing). We have created a DTS as follow but it doesn't run successfully. Is there anything wrong ? Function Main() DTSDestination("ContactName") = DTSSource ("ContactName") DTSDestination("CustomerID") = DTSSource ("CustomerID") Main = DTSTransformStat_UpdateQuery End Function . . |
#6
| |||
| |||
|
|
Source of data is a CSV file. Do you mean staging table is a temporary table that I import the CSV data ? In what circumstances we use DDQ instead of staging table ? Thanks -----Original Message----- One of the easiest ways to do this is to import your data into a staging table and then issue TSQL against the tables. The DDQ is not complex but it does take a bit of working out. Is this X Server or same server. If == same server then you could simply use 3 part naming and do your updates. What is the source of your data? -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Paul" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:2fc0e01c46d56$c2aeb0e0$a301280a (AT) phx (DOT) gbl... Dear Allan, I am new to DTS and don't know Data Driven Query at all. We have exported a couple of columns from a table. After manuplination, we have to update the table with the changed data. We are using SQL Server 2000 SP3. We want to update 3 columns + key of the table. There is no query being prepared. Thanks -----Original Message----- OK You have not mentioned 1. Errors 2. Tasks Used 3. Version of SQL Server 4. With what you want to update the table You could simply use the ExecuteSQL task to do updates. The syntax you are using requires the Data Driven Query Task which usually decides its hoice of query from a flag in the source data. If you are using the DDQ, have you set up your queries? -- -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Paul" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:2f43f01c46d28$f8f60a50$a501280a (AT) phx (DOT) gbl... We would like to update the Customer Table in Northwind database with DTS (As a testing). We have created a DTS as follow but it doesn't run successfully. Is there anything wrong ? Function Main() DTSDestination("ContactName") = DTSSource ("ContactName") DTSDestination("CustomerID") = DTSSource ("CustomerID") Main = DTSTransformStat_UpdateQuery End Function . . |
![]() |
| Thread Tools | |
| Display Modes | |
| |