Thank you for the quick reply. You were right though I had to CAST it
"Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
news:OFOGKwTeDHA.3280@tk2msftngp13.phx.gbl...
> Not sure what you want here.
>
> Do you want to generate a text file based on data in SQL Server and for
the
> First field's data prefix it with E-
>
> If yes then no Acripting is necessary as this, or at least a modified
> version of it will work in your Source SQL Statement
>
> SELECT 'E-' + col1,...........
> FROM TABLE
> WHERE <filter conditions>
>
> If you want to read from a text file and put it into SQL Server doing the
> same append then you would use an Active Script transform.
>
> In there you would have, similar to
>
> Function Main
>
> DTSDestination("ColName") = "E-" & DTSSource("ColName")
> ...
> ..
> .
> Main = DTSTransformStat_OK
>
> End Function
>
>
>
> --
> --
>
> Allan Mitchell (Microsoft SQL Server MVP)
> MCSE,MCDBA
>
www.SQLDTS.com > I support PASS - the definitive, global community
> for SQL Server professionals -
http://www.sqlpass.org >
> "Rick" <bob@bob.net> wrote in message
> news:3f61d8e9$0$104$8f4e7992@newsreader.goldengate.net...
> > I am working on a project where I need to generate a flat file using sql
> > data. The machine that I need to load the flat file on is remote
relative
> > to the location of the sql server. I am thinking about using dts
> (creating
> > a dts package on the sql server) and running the package remotely from
the
> > client, using osql or something.
> >
> > The flat file is straight forward except for concatenating "E-" to the
> > beginning of each field in the first column of data. I think I can
> probably
> > use the ActiveX script task to make this transformation but I have no
> > experience with the ActiveX script task tool. Maybe you know of an
easier
> > way. What are your thoughts?
> >
> >
>
>