Sql Query to fetch Preliminary Items

Please help with the query to fetch All the items which are in preliminary phase.

Thanks

Add Comment
3 Answer(s)

Try the Rev table.  I haven’t dived too deeply into this, but it should just be as easy as this (though I’m not sure this is pulling items that have a pending change or not):

SELECT item_number 
FROM   item i, 
       rev r 
WHERE  i.id = r.item 
       AND ( rev_number IS NULL 
              OR rev_number LIKE ‘Introductory’ ) 
       AND r.CHANGE = i.latest_released_eco

Agile Angel Answered on July 2, 2018.
Add Comment

It can be done more easily with this query:

select item_number from item where default_change = 0 and latest_released_eco = 0;

Agile Expert Answered on July 2, 2018.
Add Comment

Swagoto is correct. You can access the REV table, but it isn’t needed. If neither of the internal change attributes in the ITEM table are set, it is because there are no released changes against the item, and therefore it is at Preliminary status. Also note, there is no “Introductory” revision in the database, just the dummy record where change = 0. The status on that record is always “Preliminary”.

Agile Angel Answered on July 2, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.