![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
-----Original Message----- I am importing data from an Access DB to SQL Server 2000. However, besides those field in the Access DB, I would like to add a field named GST. I add the following statments in my Transformation Section in SQL Server but it doesn't work. Is there any suggestion ? Thanks If DTSSource("Country") = "Canada" Then DTSDestination ("GST") = 0.15 Else DTSDestination ("GST") = 0 End If . |
#3
| |||
| |||
|
|
-----Original Message----- in char comparison its safe to use trim. If ltrim(rtrim(DTSSource("Country"))) = "Canada" Then DTSDestination ("GST") = 0.15 Else DTSDestination ("GST") = 0 End If -----Original Message----- I am importing data from an Access DB to SQL Server 2000. However, besides those field in the Access DB, I would like to add a field named GST. I add the following statments in my Transformation Section in SQL Server but it doesn't work. Is there any suggestion ? Thanks If DTSSource("Country") = "Canada" Then DTSDestination ("GST") = 0.15 Else DTSDestination ("GST") = 0 End If . . |
#4
| |||
| |||
|
|
I find that when I go to the package, edit the connection between Access and SQL Server as follow and it works: 1) I create the field "GST" in Destination Tab (It creates the column "GST in the "Available Columns" in the "Transformation" tab 2) I add "GST" in the "Selected Column" of "Destination Columns" in the "Transformation" tab However, I find that when I execute the same package again. Another 40 rows (The Access DB consists of 40 records) are added to the table. How can I include a step of "truncating the table in SQL Server table process before importing data" in the package? Thanks -----Original Message----- in char comparison its safe to use trim. If ltrim(rtrim(DTSSource("Country"))) = "Canada" Then DTSDestination ("GST") = 0.15 Else DTSDestination ("GST") = 0 End If -----Original Message----- I am importing data from an Access DB to SQL Server 2000. However, besides those field in the Access DB, I would like to add a field named GST. I add the following statments in my Transformation Section in SQL Server but it doesn't work. Is there any suggestion ? Thanks If DTSSource("Country") = "Canada" Then DTSDestination ("GST") = 0.15 Else DTSDestination ("GST") = 0 End If . . |
![]() |
| Thread Tools | |
| Display Modes | |
| |