dbTalk Databases Forums  

one line input to multiple records in table

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


Discuss one line input to multiple records in table in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
awi
 
Posts: n/a

Default one line input to multiple records in table - 12-05-2003 , 04:14 PM






Hi.
I have a flat file that has many cols.
the file has to be instered into many tables(each group of cols. for a
table).
one group has 6 cols.
each of them has to be insterted into the same table with a corresponding FK
value (some ID at the beginning of the line).
there is a way (putting this values in an array and looping through). does
anybody know how to do that in ActiveX script.
thanks .



Reply With Quote
  #2  
Old   
Don R. Watters
 
Posts: n/a

Default Re: one line input to multiple records in table - 12-05-2003 , 04:21 PM






Hi Awi,

Would you mind sending some representative data, so that we can get a
better understanding of what you're trying to do? Give us an examle of the
input and output you'd like to see.

--
Regards,

Don R. Watters
Data Group Manager
PhotoWorks, Inc.


"awi" <awi (AT) kteer (DOT) com> wrote

Quote:
Hi.
I have a flat file that has many cols.
the file has to be instered into many tables(each group of cols. for a
table).
one group has 6 cols.
each of them has to be insterted into the same table with a corresponding
FK
value (some ID at the beginning of the line).
there is a way (putting this values in an array and looping through). does
anybody know how to do that in ActiveX script.
thanks .





Reply With Quote
  #3  
Old   
awi
 
Posts: n/a

Default Re: one line input to multiple records in table - 12-08-2003 , 08:44 AM



OK Don.
on table has 3 col. old_id, New_id and Old_id_type.
it is used to match old and new ids in the system (old_id_type is used to
mention the table name where the old id came from).

now .. every line in the txt file has
old_contact_id and new_contact_id : it should be inserted to the table with
the word "contact" in the old_id_type .
old_address_id and new_address_id : it should be inserted to the table witht
the word "address" in the old_id_type.
both of them have to be inserted
so .. one line of the txt file should produce 2 records in the table.
I know that's possible using some premain program and define an array for
the values.. I need some examples of that.
thanks again .





"Don R. Watters" <DonW (AT) PhotoWorks (DOT) Com> wrote

Quote:
Hi Awi,

Would you mind sending some representative data, so that we can get a
better understanding of what you're trying to do? Give us an examle of
the
input and output you'd like to see.

--
Regards,

Don R. Watters
Data Group Manager
PhotoWorks, Inc.


"awi" <awi (AT) kteer (DOT) com> wrote in message
news:Ov2oTz3uDHA.620 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Hi.
I have a flat file that has many cols.
the file has to be instered into many tables(each group of cols. for a
table).
one group has 6 cols.
each of them has to be insterted into the same table with a
corresponding
FK
value (some ID at the beginning of the line).
there is a way (putting this values in an array and looping through).
does
anybody know how to do that in ActiveX script.
thanks .







Reply With Quote
  #4  
Old   
Don R. Watters
 
Posts: n/a

Default Re: one line input to multiple records in table - 12-08-2003 , 01:41 PM



Hi Awi,

What I really need is the real data or something that looks very
similar to it and exactly what you want it to look like. Without it, it
would be unlikely that anything I came up with would solve your problem. It
would probably end up as a partial solution that you ask me to fix until we
get it right. Thanks.

--
Regards,

Don R. Watters
Data Group Manager
PhotoWorks, Inc.


"awi" <awi (AT) kteer (DOT) com> wrote

Quote:
OK Don.
on table has 3 col. old_id, New_id and Old_id_type.
it is used to match old and new ids in the system (old_id_type is used to
mention the table name where the old id came from).

now .. every line in the txt file has
old_contact_id and new_contact_id : it should be inserted to the table
with
the word "contact" in the old_id_type .
old_address_id and new_address_id : it should be inserted to the table
witht
the word "address" in the old_id_type.
both of them have to be inserted
so .. one line of the txt file should produce 2 records in the table.
I know that's possible using some premain program and define an array for
the values.. I need some examples of that.
thanks again .





"Don R. Watters" <DonW (AT) PhotoWorks (DOT) Com> wrote in message
news:edH4v33uDHA.2880 (AT) tk2msftngp13 (DOT) phx.gbl...
Hi Awi,

Would you mind sending some representative data, so that we can get
a
better understanding of what you're trying to do? Give us an examle of
the
input and output you'd like to see.

--
Regards,

Don R. Watters
Data Group Manager
PhotoWorks, Inc.


"awi" <awi (AT) kteer (DOT) com> wrote in message
news:Ov2oTz3uDHA.620 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Hi.
I have a flat file that has many cols.
the file has to be instered into many tables(each group of cols. for a
table).
one group has 6 cols.
each of them has to be insterted into the same table with a
corresponding
FK
value (some ID at the beginning of the line).
there is a way (putting this values in an array and looping through).
does
anybody know how to do that in ActiveX script.
thanks .









Reply With Quote
  #5  
Old   
Darren Green
 
Posts: n/a

Default Re: one line input to multiple records in table - 12-09-2003 , 12:06 PM



In article <#CU9EmZvDHA.1764 (AT) TK2MSFTNGP10 (DOT) phx.gbl>, awi <awi (AT) kteer (DOT) com>
writes
Quote:
OK Don.
on table has 3 col. old_id, New_id and Old_id_type.
it is used to match old and new ids in the system (old_id_type is used to
mention the table name where the old id came from).

now .. every line in the txt file has
old_contact_id and new_contact_id : it should be inserted to the table with
the word "contact" in the old_id_type .
old_address_id and new_address_id : it should be inserted to the table witht
the word "address" in the old_id_type.
both of them have to be inserted
so .. one line of the txt file should produce 2 records in the table.
I know that's possible using some premain program and define an array for
the values.. I need some examples of that.
thanks again .


Processing The Same Row More Than Once
(http://www.sqldts.com/default.aspx?266)

Maybe this is part of the solution, whereby the transformation result
constant DTSTransformStat_SkipFetch is what prevents a new row being
retrieved from the source, so the transform is executed a second time on
the same data.



--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



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.