troubleshooting Question

Header / Detail in a single query.

Avatar of FutureDBA-
FutureDBA- asked on
Oracle Database
7 Comments1 Solution246 ViewsLast Modified:
I have this data here

Chain	Customer	DelDate	      	 Route	PO_Number	ItemNumber	QTY	FLAG
85	23026		20130702	8282	451245		400		5	1
85	23026		20130702	8282	451245		401		3	1
85	23026		20130702	8282	451245		402		8	1
85	23026		20130702	8282	451245		406		3	1
85	23026		20130702	8282	451245		470		2	1
85	23026		20130702	8282	451245		471		1	1
85	23026		20130702	8282	451245		6050		9	1
85	23026		20130702	8282	451245		6080		13	1
85	23026		20130702	8282	451245		6081		15	1
85	23035		20130702	8282	989898		400		5	1
85	23035		20130702	8282	989898		401		3	1
85	23035		20130702	8282	989898		402		8	1
85	23035		20130702	8282	989898		406		3	1
85	23035		20130702	8282	989898		470		2	1
85	23035		20130702	8282	989898		471		1	1
85	23035		20130702	8282	989898		6050		9	1
85	23035		20130702	8282	989898		6080		13	1
85	23035		20130702	8282	989898		6081		15	1



Which i need to represent in this format

Chain	Customer	DelDate		Route 	PO_Number	ItemNumber	QTY	FLAG
85	23026		20130702	8282	451245		0		0	0
0	0		0		0	0		400		5	1
0	0		0		0	0		401		3	1
0	0		0		0	0		402		8	1
0	0		0		0	0		406		3	1
0	0		0		0	0		470		2	1
0	0		0		0	0		471		1	1
0	0		0		0	0		6050		9	1
0	0		0		0	0		6080		13	1
0	0		0		0	0		6081		15	1
85	23035		20130702	8282	989898		0		0	0
0	0		0		0	0		400		5	1
0	0		0		0	0		401		3	1
0	0		0		0	0		402		8	1
0	0		0		0	0		406		3	1
0	0		0		0	0		470		2	1
0	0		0		0	0		471		1	1
0	0		0		0	0		6050		9	1
0	0		0		0	0		6080		13	1
0	0		0		0	0		6081		15	1



any help is appreciated
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros