dbTalk Databases Forums  

Converting Columns

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


Discuss Converting Columns in the microsoft.public.sqlserver.dts forum.



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

Default Converting Columns - 07-05-2005 , 09:32 PM






Hi all,

Could someone tell me a way I can convert my data here...
http://users.bigpond.net.au/randombeings/example.txt
....into two numerical columns like this?
http://users.bigpond.net.au/randombeings/example2.txt

The data I have has multiple CategoryIDs for some RestaurantIDs. Rather than
being comma separated in a nvarchar field, I would like those multiple
CategoryIDs converted to multiple rows with the RestaurantID repeated.

Any help would be much appreciated.

Thx,
Offal Eater.




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

Default Re: Converting Columns - 07-06-2005 , 12:17 AM






Something like this then

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



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


"Offal Eater" <drear80 (AT) hotmail (DOT) com.nospam> wrote

Quote:
Hi all,

Could someone tell me a way I can convert my data here...
http://users.bigpond.net.au/randombeings/example.txt
...into two numerical columns like this?
http://users.bigpond.net.au/randombeings/example2.txt

The data I have has multiple CategoryIDs for some RestaurantIDs. Rather
than being comma separated in a nvarchar field, I would like those
multiple CategoryIDs converted to multiple rows with the RestaurantID
repeated.

Any help would be much appreciated.

Thx,
Offal Eater.






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.