cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Query related to promotion request in Windchill

MN_9999219
6-Contributor

Query related to promotion request in Windchill

Hi All,

 

I'm trying to write a SQL to extract the objects linked to Promotion requests in Windchill. Any inputs or directions to useful articles is helpful.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
MN_9999219
6-Contributor
(To:MN_9999219)

This SQL worked to extract promotionnumber associated with EPMDOCUMENT

 

SELECT DISTINCT
        pn.name                    AS drw_pr_name,
        pn.promotionnoticenumber,
        epmm.documentnumber        AS epmdocumentnumber,
        epm.versionida2versioninfo AS epmdoc_revision,
        pn.promotiondate,
        pn.statestate              pr_state
    FROM
             promotionnotice pn
        JOIN promotiontarget   pt ON pn.ida2a2 = pt.ida3a5
        JOIN promotionseed     ps ON ps.ida3a5 = pn.ida2a2
        JOIN epmdocument       epm ON epm.ida2a2 = pt.ida3b5
        JOIN epmdocumentmaster epmm ON epmm.ida2a2 = epm.ida3masterreference
    ORDER BY
        pn.promotionnoticenumber

View solution in original post

4 REPLIES 4

You can start looking at this article

 

[Knowledge Hub] Windchill PLM - Workflows Business Reporting

 

 

Marco
avillanueva
22-Sapphire II
(To:MN_9999219)

Are you looking to use Query Builder inside of Windchill or are you querying DB directly? Promotion Requests are stored in the PROMOTIONNOTICE table and related data in PROMOTIONSEED and PROMOTIONTARGET tables.

I'm querying the DB directly. Thanks for the inputs. Will try this out.

MN_9999219
6-Contributor
(To:MN_9999219)

This SQL worked to extract promotionnumber associated with EPMDOCUMENT

 

SELECT DISTINCT
        pn.name                    AS drw_pr_name,
        pn.promotionnoticenumber,
        epmm.documentnumber        AS epmdocumentnumber,
        epm.versionida2versioninfo AS epmdoc_revision,
        pn.promotiondate,
        pn.statestate              pr_state
    FROM
             promotionnotice pn
        JOIN promotiontarget   pt ON pn.ida2a2 = pt.ida3a5
        JOIN promotionseed     ps ON ps.ida3a5 = pn.ida2a2
        JOIN epmdocument       epm ON epm.ida2a2 = pt.ida3b5
        JOIN epmdocumentmaster epmm ON epmm.ida2a2 = epm.ida3masterreference
    ORDER BY
        pn.promotionnoticenumber

Top Tags