dbTalk Databases Forums  

delimiter activeX example

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss delimiter activeX example in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
emailcurry (AT) gmail (DOT) com
 
Posts: n/a

Default delimiter activeX example - 08-02-2006 , 01:58 PM






Hello everyone,

Newbie with DTS here. I am trying to port in a flatfile with the
following format,

abc|123^456^789|testing1
def|333^444^789|testing2
hij|444^^789|testing3

I am able to use the build-in GUI feature to set the delimiter to {|}
however, I would like to see some activeX scripting examples that can
further delimit the numbers inside the ^.

For example, at the end I want to separate them and port it into 5
different columns,
abc 123 456 789 testing1
def 333 444 789 testing2
hij 444 789 testing3

Thanks for any suggestions!

-curry


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: delimiter activeX example - 08-03-2006 , 07:40 AM






You will need to read it through an Active Script transform. You could read
the line and treat it as one string. In the Active Script transform you
split things up and allocate to the destination column accordingley.

Allan

--


Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com



<emailcurry (AT) gmail (DOT) com> wrote

Quote:
Hello everyone,

Newbie with DTS here. I am trying to port in a flatfile with the
following format,

abc|123^456^789|testing1
def|333^444^789|testing2
hij|444^^789|testing3

I am able to use the build-in GUI feature to set the delimiter to {|}
however, I would like to see some activeX scripting examples that can
further delimit the numbers inside the ^.

For example, at the end I want to separate them and port it into 5
different columns,
abc 123 456 789 testing1
def 333 444 789 testing2
hij 444 789 testing3

Thanks for any suggestions!

-curry




Reply With Quote
  #3  
Old   
emailcurry (AT) gmail (DOT) com
 
Posts: n/a

Default Re: delimiter activeX example - 08-04-2006 , 12:24 PM



Hello Allan,

Thanks for the info. Because I am not familiar with Active Script I am
looking for another alternative, which is to write my own .fmt file and
use it in a Bulk Insert Task. That could do the trick because then I
can specify when to delimiter | and ^.

However, this method can only do inserting into one table per flatfile.
I think at the end I might have to write my own SQL script for bulk
inserting from a flat file to multiple columns/table in a database.

I was hoping DTS can do the trick...quite disappointed

Thanks!

-curry


Allan Mitchell wrote:
Quote:
You will need to read it through an Active Script transform. You could read
the line and treat it as one string. In the Active Script transform you
split things up and allocate to the destination column accordingley.

Allan

--


Allan Mitchell
Konesans Ltd
T +44 7966 476 572
F +44 2071 008 479
http://www.konesans.com



emailcurry (AT) gmail (DOT) com> wrote in message
news:1154545121.868860.7540 (AT) b28g2000cwb (DOT) googlegroups.com...
Hello everyone,

Newbie with DTS here. I am trying to port in a flatfile with the
following format,

abc|123^456^789|testing1
def|333^444^789|testing2
hij|444^^789|testing3

I am able to use the build-in GUI feature to set the delimiter to {|}
however, I would like to see some activeX scripting examples that can
further delimit the numbers inside the ^.

For example, at the end I want to separate them and port it into 5
different columns,
abc 123 456 789 testing1
def 333 444 789 testing2
hij 444 789 testing3

Thanks for any suggestions!

-curry



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.