williamwhite
Programmer
Hello,
As a Newbee I have the following question.
I have a record list like:
wwit
ppiet
rron
Through the DTS I want to come to the following situation with jscript:
wwit 1 name
wwit 2 string1
wwit 3 prompt
ppiet 1 name
ppiet 2 string1
ppiet 3 prompt
rron 1 name
rron 2 string1
rron 3 prompt
I tried the following script:
//**********************************************************************
// Java Transformation Script
//************************************************************************
// Copy each source column to the destination column
function Main()
{
DTSDestination("name") = DTSSource("NAME");
DTSDestination("record_number") = 1;
DTSDestination("namesprgn") = "name";
(DTSTransformStat_SkipFetch);
DTSDestination("name") = DTSSource("NAME");
DTSDestination("record_number") = 2;
DTSDestination("namesprgn") = "prompt";
(DTSTransformStat_SkipFetch);
DTSDestination("name") = DTSSource("NAME");
DTSDestination("record_number") = 3;
DTSDestination("namesprgn") = "string1";
return(DTSTransformStat_OK);
}
The result is:
wwit 3 prompt
ppiet 3 prompt
rron 3 prompt.
Whatever i try I get or only the first line or just the third line.
I must possible is simply but i cannot get it right
gr Willie de Wit
As a Newbee I have the following question.
I have a record list like:
wwit
ppiet
rron
Through the DTS I want to come to the following situation with jscript:
wwit 1 name
wwit 2 string1
wwit 3 prompt
ppiet 1 name
ppiet 2 string1
ppiet 3 prompt
rron 1 name
rron 2 string1
rron 3 prompt
I tried the following script:
//**********************************************************************
// Java Transformation Script
//************************************************************************
// Copy each source column to the destination column
function Main()
{
DTSDestination("name") = DTSSource("NAME");
DTSDestination("record_number") = 1;
DTSDestination("namesprgn") = "name";
(DTSTransformStat_SkipFetch);
DTSDestination("name") = DTSSource("NAME");
DTSDestination("record_number") = 2;
DTSDestination("namesprgn") = "prompt";
(DTSTransformStat_SkipFetch);
DTSDestination("name") = DTSSource("NAME");
DTSDestination("record_number") = 3;
DTSDestination("namesprgn") = "string1";
return(DTSTransformStat_OK);
}
The result is:
wwit 3 prompt
ppiet 3 prompt
rron 3 prompt.
Whatever i try I get or only the first line or just the third line.
I must possible is simply but i cannot get it right
gr Willie de Wit