/build/static/layout/Breadcrumb_cap_w.png

K1000 Adding an "Assigned To" field on report

For the life of me I can't figure out what the SQL is for adding an asset Assignee Name to a report.  All I need is to add a column for assigned to at the end of the report but I can't figure out the nomenclature for it.  Any help is greatly appreciated.

0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: ondrar 6 years ago
Black Belt
1

Top Answer

Here's a sample report that will get you that, and some other fields as an example.  You have to join the User table and add the USER.FULL_NAME column to your SELECT to get their name.  Hopefully you can work this info into your report, and let me know if you have any questions.

SELECT 
  ASSET.NAME,
  ASSET.OWNER_ID,
  USER.FULL_NAME,
  USER.USER_NAME,
  USER.EMAIL

FROM ASSET

JOIN USER ON USER.ID = ASSET.OWNER_ID

WHERE ASSET.ASSET_TYPE_ID = 5

(edit for formatting)

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ