MySQL Forums
Forum List  »  Views

MultiRows to MultiColumns Help
Posted by: Jeff Manley
Date: July 01, 2011 01:36AM

I have a complex data structure that I need to flatten for certain processes by outside systems. I have several tables that have a one-to-one relationship but others that have one-to-many relationships. I need to create a single row for each consignment record.

How can I create a view that represents that?

The one-to-many tables will only have up to 3 records per consignment. I would like to represent them as Sender_Reference1, Sender_Reference2, Sender_Reference3, Sender_Reference4 for example (I have several of them). The consignment record might not have a record in which case I need to fill it with a null or empty string.

I'm at a loss on how to accomplish this within the SQL that contains the easier one-to-one relationships.

Thanks,
Jeff

Options: ReplyQuote


Subject
Views
Written By
Posted
MultiRows to MultiColumns Help
2611
July 01, 2011 01:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.