Home > Archive > MS SQL Server DTS > September 2005 > SQL DTS The way I worked









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQL DTS The way I worked
jsfromynr

2005-09-30, 7:23 am

Hello All,
First when using data Transform task I selected all the columns
(Source and destination) then I Click on new Transformation and choose
ActiveX Script .
Then I Click on the Properties to see the VBScript Generated
..Later I realised that it is combersome to map each and every column so
what I did copied the whole script part
Function Main()
.......

End Function
to Word and used Regular Expressions
DTSDestination\("(<*> )"\) = DTSSource\("(<*> )"\)
DTSDestination("\1") = DTSSource("\1")

When again I copied the whole stuff back It didnot worked for me. It
showed me an error "Invalid character at the first line of the
function".I have no idea what wen wrong.

With Warm regards
Jatinder Singh

Allan Mitchell

2005-09-30, 7:23 am

RegEx will not work inside of the AX transform like this. DTS thinks in
your statement that

A) You have a source column called (<*> )
B) You have a / outside the column name and is there just hanging
around and illegal.



--


----------------------------------------
Allan Mitchell (Microsoft SQL Server MVP)
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com





"jsfromynr" <jatinder. singh@clovertechnolo
gies.com> wrote in message
news:1128078799.191971.28930@g44g2000cwa.googlegroups.com:

> Hello All,
> First when using data Transform task I selected all the columns
> (Source and destination) then I Click on new Transformation and choose
> ActiveX Script .
> Then I Click on the Properties to see the VBScript Generated
> .Later I realised that it is combersome to map each and every column so
> what I did copied the whole script part
> Function Main()
> ......
>
> End Function
> to Word and used Regular Expressions
> DTSDestination\("(<*> )"\) = DTSSource\("(<*> )"\)
> DTSDestination("\1") = DTSSource("\1")
>
> When again I copied the whole stuff back It didnot worked for me. It
> showed me an error "Invalid character at the first line of the
> function".I have no idea what wen wrong.
>
> With Warm regards
> Jatinder Singh


jsfromynr

2005-09-30, 11:23 am

Thanks Allan,
I used Word to do the replacement.
like changing
DTSDestination("ColumnName") = DTSSource("WrongColumnName")
into
DTSDestination("ColumnName") = DTSSource("ColumnName")
and I got it to work
Jatinder

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com