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
Answers (1)
Add MACHINE.USER_LOGGED to your SELECT statement.
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