![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Okay, this seems very simple, but I'm unable to get it to work or find documentation on how to do this anywhere. I have an Excel spreadsheet I want to import into my MS SQL 2000 database using DTS. During the import, I want to devide one column by another column from the source and place this value into the destination. Here's what I'm trying: Function Main() DTSDestination("Total") = DTSSource("Total") / DTSSource("Aug") DTSDestination("Aug") = DTSSource("Aug") DTSDestination("Jul") = DTSSource("Jul") DTSDestination("Jun") = DTSSource("Jun") DTSDestination("May") = DTSSource("May") DTSDestination("Apr") = DTSSource("Apr") DTSDestination("DeptCode") = DTSSource("DeptCode") Main = DTSTransformStat_OK End Function Nothing I've tried works, plus I've been reading through Wrox SQL Server Pro DTS book and I can't find any reference on how to do this. I can do TONS of text formulas, but no calcs like this. Am I doing something wrong??? Surly this is possible during the import, and if not, why??? This seems ery simple. Thanks, Alex. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Hi, This is probably because the values are being take as VARCHAR/TEXT Instead of Numeric, This might happen if you dont assume that the first row in excel is a header cauz thats the way DTS treats excel the first row is always a header. Cheers Ravi |
![]() |
| Thread Tools | |
| Display Modes | |
| |