Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2013
    Posts
    3

    Unanswered: Bill of materials query

    Hello,

    I have a BOM table with all finished item receipes and semi items receipes. What I would like help on is to create a query where semi item materials are also listed in finished item receipe. Please see attachment for sample.


    best regards,
    Risto
    Attached Thumbnails Attached Thumbnails bomquery.jpg  

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    How many levels deep can your items be nested?
    George
    Home | Blog

  3. #3
    Join Date
    Jan 2013
    Posts
    354
    Provided Answers: 1

    Try nested sets instead of non-normalized schemas


  4. #4
    Join Date
    Dec 2013
    Posts
    3
    3 levels deep.

    highest level -finished item
    mid level - polished item
    low level - casted item

    Quote Originally Posted by gvee View Post
    How many levels deep can your items be nested?

  5. #5
    Join Date
    Dec 2013
    Posts
    3
    Problem solved! Query I was looking for is:

    Code:
    SELECT COALESCE(t1.BOMNo,t.BOMNo) AS BOMNo,
    t.MaterialNo,
    t.MaterailDescription,
    t.Quantity
    FROM BomTable t
    LEFT JOIN BOMTable t1
    ON t.BOMNo = t1.MaterialNo


    Quote Originally Posted by Ristos85 View Post
    3 levels deep.

    highest level -finished item
    mid level - polished item
    low level - casted item

  6. #6
    Join Date
    Jan 2013
    Posts
    354
    Provided Answers: 1

    This is a status, not a level!

    Quote Originally Posted by Ristos85 View Post
    3 levels deep.

    highest level -finished item
    mid level - polished item
    low level - cast item
    this is a list of status codes not BOM levels !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •