/build/static/layout/Breadcrumb_cap_w.png

I was wondering how to get Last logon user added to the script below

Select
  A20.NAME As UserName,
  ASSET_DATA_5.FIELD_23 as eMail,
  MACHINE.NAME As SYSTEM_NAME,
  MACHINE.CS_MODEL,
  MACHINE.CHASSIS_TYPE,
  MACHINE.OS_NAME,
  MACHINE.SERVICE_PACK,      
  BIOS_SERIAL_NUMBER,
  MACHINE.RAM_Total,
  DATE_FORMAT (D.SHIP_DATE, '%M %D, %Y') AS 'SHIP DATE'
 
From
  MACHINE Left Join
  ASSET On ASSET.MAPPED_ID = MACHINE.ID And ASSET.ASSET_TYPE_ID = 5 Left Join
  ASSET_ASSOCIATION J20 On J20.ASSET_ID = ASSET.ID And J20.ASSET_FIELD_ID = 20
  Left Join
  ASSET A20 On A20.ID = J20.ASSOCIATED_ASSET_ID Left Join
  ASSET_DATA_5 On ASSET_DATA_5.ID = ASSET.ASSET_DATA_ID Left Join
  KBSYS.DELL_ASSET D On D.SERVICE_TAG = MACHINE.BIOS_SERIAL_NUMBER
Where
  A20.NAME != ''
Order By
  A20.NAME,
  ASSET_DATA_5.FIELD_23


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Add MACHINE.USER_LOGGED to your SELECT statement.
Posted by: dugullett 12 years ago
Red Belt
3

Add MACHINE.USER_LOGGED to your SELECT statement. 

Also if you want to clean it up some do something like this. 

If you add FROM MACHINE M you can then take all the MACHINE. and replace them with M.


Comments:
  • That works! Thank you
    One more question. The last 2 fields don't show the title. Is there a limitation in Kace on how many you can have - mnutbrown 12 years ago
    • Not for sure. You could try shrinking some of the names down. CHASSIS_TYPE as Chassis, SERVICE_PACK as SP, MACHINE.NAME As Name.
      There is a way to edit the XML using Classic Reports, but from the looks of it that's not what you are using. - dugullett 12 years ago
 
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