Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 14th, 2011, 07:39 AM
Concatch Concatch is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2011
Posts: 2 Concatch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 17 sec
Reputation Power: 0
Collapse a matrix to a single line item

Hi,

I think it would be best to use a simple example to explain my problem. The table below needs to become compressed into to distinct line items
Customer_No Hair SP_Code Gender Age Colour Weight
1 blonde 123 M null null null
1 blonde 123 null 23 null null
1 blonde 123 null null Green null
1 blonde 123 null null null 98
1 blonde 123 null null null null
1 blonde 123 null null null null
1 blonde 123 null null null null
1 blonde 123 null null null null
2 Blue 444 F null null null
2 Blue 444 null 28 null null
2 Blue 444 null null Pink null
2 Blue 444 null null null 64
2 Blue 444 null null null null
2 Blue 444 null null null null
2 Blue 444 null null null null
2 Blue 444 null null null null

Needs to become

Customer_No Hair SP_Code Gender Age Colour Weight
1 blonde 123 M 23 Green 98
2 blue 444 F 28 Pink 64

I have over 163 000 'customers' and customer_no is not necessarily consecutive. There may not exist a customer 3 for example. ie Customer 1, Customer 2, Customer 4...etc. Is there any way to loop through the procedure and pick up the customer_no that exists in the Customer_no column?

Thank-you very much for your time.


Banner:
Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
"CORE 11.2.0.2.0 Production"
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Collapse a matrix to a single line item

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap