Re: SQL-statement - BOM problem




ohahaahr@xxxxxxxxxxx wrote:
> Hi !
>
> I am working a bill-of-material (BOM) problem, and i need some help.
> I want to make a report for my employees at the warehouse, telling them
> which articles to pick.
>
> I have the following table BOMTABLE:
>
> PARENT CHILD QTY
> ------ ------ ---
> bike wheel 2
> bike saddle 1
> car wheel 4
> car door 4
> wheel tire 1
> wheel rim 1
>
>
> To see the materials needed to build a bike, I have launched the
> following statement:
>
> SELECT bom.child , LEVEL
> FROM bomtable bom
> START WITH bom.parent = 'bike'
> CONNECT BY PRIOR child = parent
>
>
> This gives me the following output:
>
> CHILD LEVEL
> ------ -----
> saddle 1
> wheel 1
> tire 2
> rim 2
>
>
> But the people at the warehouse needs a report like this, showing the
> bottom level of the BOM, and the QTY to pick.
>
> CHILD QTY
> ------ ---
> saddle 1
> tire 2
> rim 2
>
>
> (They should not pick 2 wheels, but 2 tires and 2 rims).
>
>
> Is there an easy way to do this ?
>
> (I am using Oracle 10g)

Lookup "hierarchical total" on AskTom.

.



Relevant Pages

  • Re: SQL-statement - BOM problem
    ... > I am working a bill-of-material (BOM) problem, ... > PARENT CHILD QTY ... > bike wheel 2 ... > bike saddle 1 ...
    (comp.databases.oracle.misc)
  • SQL-statement - BOM problem
    ... I am working a bill-of-material (BOM) problem, ... PARENT CHILD QTY ... bike wheel 2 ... bike saddle 1 ...
    (comp.databases.oracle.misc)
  • Re: are these wheels any good?
    ... tires, actually rides and shifts better than it has any right to. ... One fault that I found was that the rear wheel is both dished wrong ... You don't say anything about the rest of the bike ...
    (rec.bicycles.tech)
  • Re: are these wheels any good?
    ... about "one decent bike") ... tires, actually rides and shifts better than it has any right to. ... One fault that I found was that the rear wheel is both dished wrong (may ...
    (rec.bicycles.tech)
  • Re: BIG guy crashes
    ... If you went sliding sideways, stayed with the bike and things didn't bounce around, your fork probably didn't take much force in the crash. ... The handle bar tape shows scratches to both side sections on the outside below the lever. ... I can't explain how the rear wheel got bent but I can see where the bars went to perpendicular by the mark on the frame where the front calipers collided with the down tube. ...
    (rec.bicycles.tech)