Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Ektron File Extension Asset Inventory

Posted on October 17, 2013October 26, 2015 By David Kittell

Following the logic in a previous post, File Extension, this query will list Ektron asset file extensions and count them.

SELECT (
		CASE
			WHEN handle LIKE '%.%'
				THEN reverse(left(reverse(handle), charindex('.', reverse(handle)) - 1))
			ELSE ''
			END
		) AS FilePath
	,COUNT(*) AS 'Total Assets'
FROM AssetDataTable
GROUP BY (
		CASE
			WHEN handle LIKE '%.%'
				THEN reverse(left(reverse(handle), charindex('.', reverse(handle)) - 1))
			ELSE ''
			END
		)
ORDER BY FilePath
SELECT (
		CASE
			WHEN handle LIKE '%.%'
				THEN reverse(left(reverse(handle), charindex('.', reverse(handle)) - 1))
			ELSE ''
			END
		) AS FilePath
	,CASE
		WHEN [content_status] = 'A'
			THEN 'Approved'
		WHEN [content_status] = 'O'
			THEN 'Checked Out'
		WHEN [content_status] = 'I'
			THEN 'Checked In'
		WHEN [content_status] = 'S'
			THEN 'Submitted for Approval'
		WHEN [content_status] = 'M'
			THEN 'Marked for Deletion'
		WHEN [content_status] = 'P'
			THEN 'Pending Go Live Date'
		WHEN [content_status] = 'T'
			THEN 'Awaiting Completion of Associated Tasks'
		WHEN [content_status] = 'D'
			THEN 'Pending Deletion'
		END AS ContentStatus
	,COUNT(*) AS 'Total Assets'
FROM AssetDataTable
INNER JOIN content c ON c.asset_id = AssetDataTable.id
GROUP BY (
		CASE
			WHEN handle LIKE '%.%'
				THEN reverse(left(reverse(handle), charindex('.', reverse(handle)) - 1))
			ELSE ''
			END
		)
	,[content_status]
ORDER BY FilePath
	,ContentStatus
Originally Posted on October 17, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code Ektron MSSQL MSSQL - Audit MSSQL - Ektron MSSQL - Ektron 8.0.2 SQL

Post navigation

Previous post
Next post

Related Posts

Azure CLI – Convert VM Dynamic IP to Static IP

Posted on April 5, 2018

If you create your VM with Dynamic IPs DHCP will grab the first available IP but some VMs are best on a static IP. This script below will get the existing IP of the ipconfig and reassign it to the same ipconfig as a static IP. Dynamic_To_Static () { nic="$4"…

Read More

Android ADB List/Uninstall Apps

Posted on September 29, 2014October 26, 2015

adb shell pm list packages -f >> AppList.txt adb shell pm uninstall -k <PackageName> adb shell pm uninstall -k as.adamsmith.etherealdialpad Originally Posted on September 29, 2014Last Updated on October 26, 2015 All information on this site is shared with the intention to help. Before any source code or program is…

Read More

PowerShell – Start / Stop IIS Website and Application Pool

Posted on November 16, 2015

clear Function Load-WebAdmin { $webAdminModule = get-module -ListAvailable | ? { $_.Name -eq "webadministration" } If ($webAdminModule -ne $null) { import-module WebAdministration } } # Variables – Start $siteName = $args[0] # "default web site" $appPoolName = $args[1] # "DefaultAppPool" $action = $args[2] # 1 for stop, 0 for start…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes