/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


Query Assets added by month

06/24/2020 91 views

Hello!

Could anyone with some basic SQL knowledge provide some guidance on how I could enter in a report query for assets added month to month?

I'd like to be able to visualize all assets (hardware) that are entered into Kace for any specific month to be able to provide to our Finance team as an excel sheet for more efficient data tracking, based on the asset creation date.

Seems easy enough, but my SQL scripting know-how is pretty non-existent. Thanks for any help!

0 Comments   [ + ] Show comments

Comments

  • This content is currently hidden from public view.
    Reason: Removed by member request For more information, visit our FAQ's.

All Answers

1

First you need to be aware, although you probably already are, you cannot enter date details into a report on the fly, so you either need to be specific in your date range or create a report that says Assets added this month and run the report on a schedule to get the data.


 SELECT ASSET_TYPE.NAME, ASSET.NAME, ASSET.CREATED

FROM ASSET    ASSET

     INNER JOIN ASSET_TYPE ASSET_TYPE

        ON (ASSET.ASSET_TYPE_ID = ASSET_TYPE.ID)

WHERE (((TIMESTAMP(ASSET.CREATED) <= NOW() AND TIMESTAMP(ASSET.CREATED) > DATE_SUB(NOW(),INTERVAL 1 MONTH))))  ORDER BY ASSET.NAME


That should show you all Assets created in the last month, but you may want to also filter on the asset type

Answered 06/25/2020 by: Hobbsy
Red Belt

  • Thank you Hobbsy! This works! I get a list of assets that were added.. but this leads me to another question. Is it possible to specify more data to be provided? The list it generated provides me the asset name, created date and asset type. Can more fields get added to this?

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