How to add PO to this report
Hello,
I have a report but I would like to insert the PO number in on the second column. Would anyone be able to help?
SELECT productType.COMPONENTTYPENAME "Product Type",res.RESOURCENAME,resources.SERIALNO "Serial Number",longtodate(res.ACQUISITIONDATE) "Acquisition Date",longtodate(ResourceStateHistory.STARTTIME) "Changed Date",aaa.FIRST_NAME "Changed By",rstate.DISPLAYSTATE "Previous State",ResourceState.DISPLAYSTATE "Current State",AaaUser.FIRST_NAME "Assigned User",DepartmentDefinition.DEPTNAME "Assigned Dept" FROM ResourceStateHistory LEFT JOIN ResourceOwnerHistory ON ResourceStateHistory.STATEHISTORYID=ResourceOwnerHistory.STATEHISTORYID LEFT JOIN ResourceState ON ResourceStateHistory.RESOURCESTATEID=ResourceState.RESOURCESTATEID LEFT JOIN ResourceAssociationHistory ON ResourceOwnerHistory.RESOURCEOWNERID=ResourceAssociationHistory.RESOURCEOWNERID LEFT JOIN Resources ON ResourceAssociationHistory.ASSTTORESOURCEID=Resources.RESOURCEID LEFT JOIN SDUser ON ResourceOwnerHistory.USERID=SDUser.USERID LEFT JOIN AaaUser ON SDUser.USERID=AaaUser.USER_ID LEFT JOIN DepartmentDefinition ON ResourceOwnerHistory.DEPTID=DepartmentDefinition.DEPTID LEFT JOIN Resources res ON ResourceStateHistory.RESOURCEID=res.RESOURCEID LEFT JOIN ResourceState rstate ON
ResourceStateHistory.PREVRESOURCESTATEID=rstate.RESOURCESTATEID LEFT JOIN AaaUser aaa ON ResourceStateHistory.USERID=aaa.USER_ID LEFT JOIN ComponentDefinition product ON res.COMPONENTID=product.COMPONENTID LEFT JOIN ComponentType productType ON product.COMPONENTTYPEID=productType.COMPONENTTYPEID WHERE aaa.FIRST_NAME IS NOT NULL AND ResourceStateHistory.STARTTIME >= <from_lastmonth> AND ResourceStateHistory.STARTTIME <= <to_lastmonth>
ORDER BY 1,2,3
New to ADSelfService Plus?