Advertisement

10.09.2007 at 01:32PM PDT, ID: 22882552
[x]
Attachment Details

DTS Import of flat data / transform (ActiveX) if then

Asked by pwanveer in MS SQL DTS, MS SQL Server, VB Script

Tags: dts, activex, call

DTS Import of flat (text) file / VBScript transformation (ActiveX)
Fld 20      Fld 21
-            00002500.2369
NULL     00000182.50

Fld 20 Positive / Negitive indicator
Fld 20 Number value

IF Fld 20 = - then value = Fld 21 * -1 (In other words negitive value) ELSE Fld 21 = Fld 21.

I have tried the following and recive the following error: Invalid procedure call or argument: 'DTSSource'
(the error seems to reside in this string (If (Dat)= ("-")  Then) of:

Function Main()
     DTSDestination("POST_BAM") = Value(DTSSource("Col021"))
     Main = DTSTransformStat_OK
End Function

Function Value  (Byval Dat)

Dat = DTSSource("Col020")

If (Dat)= ("-")  Then
      Value =  DTSSource("Col021") * -1
Else
         Value = DTSSource("Col021")
End If

End Function

Thank you
Start Free Trial
[+][-]10.09.2007 at 01:48PM PDT, ID: 20044457

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.09.2007 at 02:45PM PDT, ID: 20044844

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.09.2007 at 02:51PM PDT, ID: 20044887

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]10.09.2007 at 03:07PM PDT, ID: 20044977

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.09.2007 at 03:16PM PDT, ID: 20045031

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.09.2007 at 03:17PM PDT, ID: 20045039

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL DTS, MS SQL Server, VB Script
Tags: dts, activex, call
Sign Up Now!
Solution Provided By: dbbishop
Participating Experts: 2
Solution Grade: C
 
 
[+][-]10.09.2007 at 03:23PM PDT, ID: 20045064

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.10.2007 at 09:56AM PDT, ID: 20050182

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.10.2007 at 10:15AM PDT, ID: 20050362

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628