Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
file sizes on uploads
Samuelq
Greetings,
I am querying the job history log for uploads for a specific month, but I also need to know the size of the files that were uploaded.
Since the file size is not in the job history log table, how can I adjust the query below to obtain the file size in the results?
SELECT log_stamp AS upload_time, image_name AS asset_name, CAST(image_id AS uniqueidentifier) AS asset_id,
user_name AS inserting_user_name, task_name AS upload_task
FROM dbo.JobHistoryLog
WHERE
(job_type LIKE 'Insertion')
and year(log_stamp) = 2008
and month(log_stamp) = 12
Thank you,
Jim
Find more posts tagged with
Comments
lyman
Assuming that you have the reporting views installed:
SELECT m.metadata_value as FileSizeKb, log_stamp AS upload_time, image_name AS asset_name, CAST(image_id AS uniqueidentifier) AS asset_id,
user_name AS inserting_user_name, task_name AS upload_task
FROM dbo.JobHistoryLog h, dbo.ReportAssetMetadata m
WHERE
h.image_id = m.asset_id and
(job_type LIKE 'Insertion')
and year(log_stamp) = 2008
and month(log_stamp) = 12
and
metadata_id='{EF543245-24B4-4e35-B178-7BDB95C3BBE7}'
Cheers,
Lyman Hurd
Samuelq
Thanks, Lyman! You are the greatest; that worked perfect. I really appreciate it.
One more question, while we're on a roll:
Can the query be run to zero in on a specific folder, so that it can just give results for assets in a folder (including the subfolders)?
Jim
lyman
Try something like this.
select m.metadata_value as FileSizeKb, upload_time, u.asset_name, u.asset_id,
inserting_user_name, upload_task
from dbo.ReportAssetUploads u, dbo.ReportAssetMetadata m where
u.asset_id = m.asset_id
and year(upload_time) = 2008
and month(upload_time) = 12
and
metadata_id='{EF543245-24B4-4e35-B178-7BDB95C3BBE7}'
and
repository_path like 'Media Database/folder7%'
Cheers,
Lyman Hurd
Samuelq
It works! Thank you, Lyman.
Jim