The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

ps.parent_id To the column value ,the ps.customer_id ,ps.short_name is row, sum(ps.quantity) is the value

WITH RECURSIVE PS ( product_code,description,parent_id,customer_id,short_name,quantity) as
    (select product_code,description,parent_id,'ID' D,'Sname' E,F=1000000.00*0  from product_code where parent_id='CP'
     union all
    select b.product_code,b.description,b.parent_id,cu.customer_id,cu.short_name,shl.quantity  from ((((ps p join product_code b on p.product_code=b.parent_id ) join part s on b.product_code=s.product_code) join shipper_line shl on s.part_id=shl.part_id) join shipper sh on shl.trans_no=sh.trans_no) join customer cu on sh.customer_id=cu.customer_id)
    select  ps.parent_id,product_code.description ,ps.customer_id  ,ps.short_name ,sum(ps.quantity   from ps,product_code

where ps.parent_id  in (select product_code from product_code where parent_id='CP') and product_code.product_code=ps.parent_id  group by ps.parent_id,product_code.description,ps.customer_id,ps.short_name order by ps.parent_id

asked 12 Sep '13, 12:40

mfkpie8's gravatar image

accept rate: 5%


So ... what is the question?

(13 Sep '13, 03:26) Martin
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 12 Sep '13, 12:40

question was seen: 393 times

last updated: 13 Sep '13, 03:27