Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
18 views1 page

SQL Query To Find Out BOM PDF

A community member is seeking assistance in identifying database tables that store bill of material (BOM) information for products in Windchill, specifically looking for top-level nodes and linked documents. Various replies provide SQL queries and insights on how to extract this information, including details on relevant tables and columns. The discussion includes multiple follow-up questions regarding specific BOM structures and revisions.

Uploaded by

A rubangura
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

SQL Query To Find Out BOM PDF

A community member is seeking assistance in identifying database tables that store bill of material (BOM) information for products in Windchill, specifically looking for top-level nodes and linked documents. Various replies provide SQL queries and insights on how to extract this information, including details on relevant tables and columns. The discussion includes multiple follow-up questions regarding specific BOM structures and revisions.

Uploaded by

A rubangura
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Start a topic LOGIN

MENU

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Community / PLM / Windchill Discussions / SQL Query to find out BOM Options

SQL Query to find out BOM


Jul 23, 2015 07:33 AM

Community Survey
srohde 1-Visitor

Dear community,
I need to find out what database tables store the information about the bill of material of the products. Need to find out
the top level nodes and all linked epm documents or parts.
What we try to do is get the files of all products so we can Export all products from windchill.
Any help is appreciated.
Thanks.
Contact Community
Management
Labels: BOM_Platform Mgmt

 0 Kudos Reply Notify Moderator


Recommendations

10 REPLIES  
  PDMLink plan related SQL
statement query

bsindelar 12-Amethyst (To:srohde) Jul 23, 2015 09:59 AM

  How to show the EPM


Stefan, document status in sql query
WTPart-to-WTPart Parent-Child links that build a WTPart BOM are stored in the WTPARTUSAGELINK table.
WTPart-to-EPMDocument owner links are stored in the EPMBUILDRULE table.
  Sql query which deletes
There are more tables needed to query if you're looking to pull EVERYTHING related to a specific WTPart or
duplicate versions of docu...
EPMDocument. Let me know if there's any way I can help you with an extraction.

  FIND NAME of WTDocument


 0 Kudos Reply Notify Moderator
SubType in SQL Windchill

Sep 09, 2015 08:47 AM   Uncompleted Report Query


srohde 1-Visitor (To:bsindelar)
builder
In which columns are those 2 Parts stored? I can only see the IDA3A5 column which holds 1 Part
Info. where is the Parent and the Child Part stored? Top Tags 

 0 Kudos Reply Notify Moderator

syadala 12-Amethyst (To:srohde) Sep 09, 2015 09:33 AM

Hi Stefan,
IDA3A5 id the Object ID of parent IDA3B5 is object ID of child (PartMaster). If you
want number you have lo include Part master in you query. Let me know if you
need any info.
regards
Sudhakar

 0 Kudos Reply Notify Moderator

srohde 1-Visitor (To:syadala) Sep 09, 2015 09:52 AM

Ok, i found the head of the bom. How can i link the partmaster table row to the
content of the product (im searching for the filename). I'm searching for the bom of
the partmaster with a filename like '%.asm'

 0 Kudos Reply Notify Moderator

bsindelar 12-Amethyst (To:srohde) Sep 10, 2015 09:36 AM

If you have the epmdocument ida2a2 value of the top-level BOM item, you can find
it's related epmdocumentmaster by taking the "ida3masterreference" value of that
epmdocument. That value will equal the ida2a2 value of epmdocumentmaster,
which from there you can just pull the cadname field.

 0 Kudos Reply Notify Moderator

adev-2 4-Participant (To:srohde) Jul 27, 2016 04:55 AM

Hi Stefan,
Try this query to get the BOM structure
SELECT M1.WTPARTNUMBER AS COMPONENT, M2.WTPARTNUMBER AS ASSEMBLY
FROM WTPART, WTPARTMASTER M2, WTPARTUSAGELINK, WTPARTMASTER M1
WHERE WTPART.IDA3MASTERREFERENCE = M2.IDA2A2
AND WTPART.IDA2A2 = WTPARTUSAGELINK.IDA3A5
AND WTPARTUSAGELINK.IDA3B5 = M1.IDA2A2
and M2.WTPARTNUMBER = '<Part_number>'
GROUP BY M2.WTPARTNUMBER, M1.WTPARTNUMBER
order by M2.WTPARTNUMBER, M1.WTPARTNUMBER;

 2 Kudos Reply Notify Moderator

TV_9780501 2-Explorer (To:adev-2) Feb 16, 2021 03:15 PM

How do we find the Specific version of a BOM. For example:


Part 1 Rev B.1 Child 1 Rev B.2
Part 1 Rev A.1 Child 1 Rev B.1

Thanks.

 0 Kudos Reply Notify Moderator

TV_9780501 2-Explorer (To:adev-2) Feb 16, 2021 09:26 PM

How do we find the BOM structure for a specific Revision (in SQL), not the latest structure but at the
time when a parent revision is released. Thanks

 0 Kudos Reply Notify Moderator

Wncplmmis2 3-Newcomer Nov 03, 2021 02:13 AM

(To:TV_9780501)

try this by modify WTPART.versionida2versioninfo = what version you want to


query

-----------------------------------------------------
SELECT *
FROM
(select
(SELECT wtpartnumber
FROM wtpartmaster
WHERE ida2a2=(SELECT ida3masterreference FROM wtpart WHERE
ida2a2=wtpartusagelink.ida3a5)
) AS parentpart ,
(SELECT wtpartnumber FROM wtpartmaster WHERE
ida2a2=wtpartusagelink.ida3b5
) AS CHILDPART ,
(SELECT listagg(wtpartnumber,',') within GROUP(
ORDER BY wtpartnumber)
FROM WTPARTSUBSTITUTELINK a ,
wtpartmaster b
WHERE a.ida3b5 = b.ida2a2
AND a.ida3a5 = wtpartusagelink.ida2a2
) AS Subpart ,
AMOUNTA7 AS QTY,
(select listagg(name,',') within GROUP(
ORDER BY name) from PartUsesOccurrence where IDA3LINKREFERENCE =
wtpartusagelink.ida2a2 ) location
FROM wtpartusagelink
WHERE markfordeletea2 =0
AND wtpartusagelink.ida3a5 IN
(SELECT WTPART_ID
FROM
(SELECT WTPARTMASTER.Ida2a2 AS WTPARTMASTER_ID,
WTPART.Ida2a2 AS WTPART_ID,
WTPARTMASTER.WTPARTNUMBER,
WTPART.statecheckoutinfo,
WTPART.versionida2versioninfo AS version,
WTPART.iterationida2iterationinfo AS iteration,
statestate,
WTPART.versionsortida2versioninfo AS versionorder,
wtpart.CREATESTAMPA2 AS CreationDate,
wtpart.UPDATESTAMPA2 AS LastModifyDate,
WTPARTMASTER.name AS PART_DESC,
wtpart.IDA3D2ITERATIONINFO,
RANK () OVER (PARTITION BY WTPARTNUMBER ORDER BY
WTPART.versionsortida2versioninfo DESC) AS RANK,
wtpart.parttype
FROM WTPART,
WTPARTMASTER
WHERE WTPARTMASTER.IDA2A2 = WTPART.IDA3MASTERREFERENCE
AND WTPART.latestiterationinfo = 1
AND WTPART.statecheckoutinfo <> 'wrk'
ORDER BY WTPARTNUMBER,
WTPART.versionsortida2versioninfo
) ALLPART
WHERE RANK = 1
)
START WITH (SELECT WTPARTNUMBER
FROM WTPARTMASTER
WHERE ida2a2=(SELECT ida3masterreference FROM wtpart WHERE
ida2a2=ida3a5)) = :your Part_number
CONNECT BY (SELECT WTPARTNUMBER
FROM WTPARTMASTER
WHERE ida2a2=(SELECT ida3masterreference FROM wtpart WHERE
ida2a2=ida3a5)) =PRIOR (SELECT wtpartnumber FROM wtpartmaster WHERE
ida2a2=ida3b5)
)

 0 Kudos Reply Notify Moderator

AA_9660970 3-Newcomer Sep 09, 2024 12:19 PM

(To:Wncplmmis2)

Hi all

Can you please help with the MSSQL query of the multi-level BOM without
depending on the wtpartusagelink ?

 0 Kudos Reply Notify Moderator

About Resources Other PTC Communities


PTC.com My PTC - Support Onshape
Products & Solutions PTC University Reality Lab
Contact Help Center - Product Guides Vuforia Engine
Product Documentation PTC user
Success Paths - Planning &
Implementation Guides

Terms of Service Privacy Policy

 Top
:

You might also like