dbTalk Databases Forums  

How to convert a single row in several rows

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


Discuss How to convert a single row in several rows in the microsoft.public.sqlserver.dts forum.



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

Default How to convert a single row in several rows - 10-10-2003 , 04:14 PM






I´m using SQL Server 7 and DTS to insert some data from a survey.

The data is like this, using n products:

form_id, section_name, product1_id, product2_id, product3_id, product4_id,
.... product1_role, product2_role, product3_role, ... etc.

I want to convert it to :

section_id, form_id, section_name, product_id, product_role, etc.

and insert n rows in the destiny from one row in the origin.

Is this possible ?

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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

Default Re: How to convert a single row in several rows - 10-10-2003 , 04:26 PM






You could adapt this article

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

--
--

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

"Nicolay" <ngiraldo (AT) colomsat (DOT) co.net> wrote

Quote:
I´m using SQL Server 7 and DTS to insert some data from a survey.

The data is like this, using n products:

form_id, section_name, product1_id, product2_id, product3_id, product4_id,
... product1_role, product2_role, product3_role, ... etc.

I want to convert it to :

section_id, form_id, section_name, product_id, product_role, etc.

and insert n rows in the destiny from one row in the origin.

Is this possible ?

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/



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

Default Re: How to convert a single row in several rows - 10-11-2003 , 01:29 PM



El Vie, 10 Oct 2003 22:26:41 +0100, Allan Mitchell
<allan (AT) no-spam (DOT) sqldts.com> escribió:

Quote:
You could adapt this article

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

It works, now, how can I put the data in several tables in a single
transformation?

--
Nicolay Giraldo


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

Default Re: How to convert a single row in several rows - 10-11-2003 , 03:39 PM



You can use lookups

How to Use Lookups in DTS
(http://www.sqldts.com/default.aspx?277)

--


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




"Nicolay" <ngiraldo (AT) colomsat (DOT) co.net> wrote

Quote:
El Vie, 10 Oct 2003 22:26:41 +0100, Allan Mitchell
allan (AT) no-spam (DOT) sqldts.com> escribió:

You could adapt this article

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


It works, now, how can I put the data in several tables in a single
transformation?

--
Nicolay Giraldo



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.