![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hi, I wrote an activex script in the data pump. I have a flag that will be set depending on the column value in the text file. Based on the flag, I |
|
Function Main() Flag = GetTheColumnValue If Flag = 1 Then DTSDestination(1) = DTSSource(1) ..... .... End If End Function So, whenever the Flag is not 1, the data should not be transferred. But, the column 1 in the destination is a primary key. so, the datapump is throwing an exception, primary key cann't be null....blah blah... Am I doing some thing wrong? How can I avoid the transformation if the flag is not 1. any ideas are appreciated. thanks, Sreenath |
#3
| |||
| |||
|
|
-----Original Message----- OK So you have a text file that perhaps looks like MyCol 1 2 3 4 5 You want to move all rows that are <> 1 I know this isn't your exact scenario but the principal is the same In your Active Script transform you need to do this Function Main() select case DTSSource("MyCol") case "1" Main = DTSTransformStat_SkipInsert case else DTSDestination("MyCol") = DTSSource("MyCol") Main = DTSTransformStat_OK end select End Function -- -- 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 "Sreenath" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news 1D5CD78-D062-4AF7-A5D9-974EDE8540DB (AT) microsoft (DOT) com...hi, I wrote an activex script in the data pump. I have a flag that will be set depending on the column value in the text file. Based on the flag, I was to transform the data from source to destination. So, the code looks like this: Function Main() Flag = GetTheColumnValue If Flag = 1 Then DTSDestination(1) = DTSSource(1) ..... .... End If End Function So, whenever the Flag is not 1, the data should not be transferred. But, the column 1 in the destination is a primary key. so, the datapump is throwing an exception, primary key cann't be null....blah blah... Am I doing some thing wrong? How can I avoid the transformation if the flag is not 1. any ideas are appreciated. thanks, Sreenath . |
#4
| |||
| |||
|
|
Hi, I am experiencing a strange situation. I have a excel file (97-2000 Office)version. I am trying to read the file throught DTS datapump. That file has some columns, values will be either numbers or "--" and headings are in string. Some how, DTS is not able to recognize the numerical values but able to see the headings. If I open the file in EXCEL, the cell format was General. Any clue? Thanks, Sreenath |
#5
| |||
| |||
|
|
In message <9028F81C-A3EE-4501-9495-946A2BB791C3 (AT) microsoft (DOT) com>, Sreenath <Sreenath (AT) discussions (DOT) microsoft.com> writes Hi, I am experiencing a strange situation. I have a excel file (97-2000 Office)version. I am trying to read the file throught DTS datapump. That file has some columns, values will be either numbers or "--" and headings are in string. Some how, DTS is not able to recognize the numerical values but able to see the headings. If I open the file in EXCEL, the cell format was General. Any clue? Thanks, Sreenath Maybe this will help- Excel treats First Row of Data as Headers (http://www.sqldts.com/Default.aspx?255) -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
![]() |
| Thread Tools | |
| Display Modes | |
| |