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 Asset Library List

Posted on October 21, 2013October 26, 2015 By David Kittell
SELECT (
		SELECT lib_type
		FROM libtype
		WHERE libtype.libtype_id = l.libtype_id
		) AS LibType,
	lib_id AS 'Library ID',
	lib_title AS 'Library Title',
	[filename] AS 'Library URL',
	CASE
		WHEN libtype_id < 3
			THEN CASE
					WHEN filename LIKE '%.%'
						THEN RIGHT(filename, Len(filename) - Charindex('.', filename))
					ELSE filename
					END
		END AS FileExt,
	content_id AS 'Content ID',
	(
		SELECT content_title
		FROM content
		WHERE content_id = l.content_id
		) AS 'Content Title',
	parent_id AS 'Parent ID',
	(
		SELECT DISTINCT CASE
				WHEN parent_id > 0
					THEN (
							SELECT DISTINCT folder_name
							FROM library_folder_tbl lft2
							WHERE lft1.parent_id = lft2.folder_id
							) + ' - ' + lft1.folder_name
				ELSE lft1.folder_name
				END AS FolderName
		FROM library_folder_tbl lft1
		WHERE folder_id = l.parent_id
		) AS 'Folder Name',
	date_created AS 'Date Created',
	--user_id AS 'Created By ID',
	(
		SELECT (first_name + ' ' + last_name)
		FROM users
		WHERE user_id = l.user_id
		) AS 'Created By',
	last_edit_date AS 'Last Edit Date',
	(l.[last_edit_fname] + ' ' + l.[last_edit_lname]) AS 'Last Editor',
	CASE content_type
		WHEN - 1
			THEN CAST(content_type AS VARCHAR(5)) + ' - AllTypes'
		WHEN 1
			THEN CAST(content_type AS VARCHAR(5)) + ' - Content'
		WHEN 2
			THEN CAST(content_type AS VARCHAR(5)) + ' - Forms'
		WHEN 3
			THEN CAST(content_type AS VARCHAR(5)) + ' - Archive Content'
		WHEN 4
			THEN CAST(content_type AS VARCHAR(5)) + ' - Archive Forms'
		WHEN 7
			THEN CAST(content_type AS VARCHAR(5)) + ' - PDF Assets'
		WHEN 8
			THEN CAST(content_type AS VARCHAR(5)) + ' - Assets'
		WHEN 9
			THEN CAST(content_type AS VARCHAR(5)) + ' - Archive Assets'
		WHEN 12
			THEN CAST(content_type AS VARCHAR(5)) + ' - Archive Media'
		WHEN 99
			THEN CAST(content_type AS VARCHAR(5)) + ' - Non Library Content'
		WHEN 101
			THEN CAST(content_type AS VARCHAR(5)) + ' - MS Office Assets'
		WHEN 102
			THEN CAST(content_type AS VARCHAR(5)) + ' - PDF Assets'
		WHEN 103
			THEN CAST(content_type AS VARCHAR(5)) + ' - PDF Assets'
		WHEN 106
			THEN CAST(content_type AS VARCHAR(5)) + ' - PNG Image Assets'
		WHEN 104
			THEN CAST(content_type AS VARCHAR(5)) + ' - Multimedia'
		WHEN 1102
			THEN CAST(content_type AS VARCHAR(5)) + ' - Archived PDF Assets'
		WHEN 1111
			THEN CAST(content_type AS VARCHAR(5)) + ' - Discussion Topic'
		WHEN 3333
			THEN CAST(content_type AS VARCHAR(5)) + ' - Catalog Entry'
		ELSE CAST(content_type AS VARCHAR(5))
		END AS 'Content Type'
FROM library l
ORDER BY 'Folder Name',
	LibType,
	parent_id
Originally Posted on October 21, 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 - Ektron MSSQL - Ektron 8.0.2 MSSQL - Ektron 8.7 SQL

Post navigation

Previous post
Next post

Related Posts

Ektron List All PageBuilder Pages

Posted on January 5, 2015October 26, 2015

SET NOCOUNT ON DECLARE @Domain VARCHAR(50) SET @Domain = ‘/’ SELECT c.[content_id], c.[content_title], c.[content_html], CASE WHEN c.[content_status] = ‘A’ THEN ‘Approved’ WHEN c.[content_status] = ‘O’ THEN ‘Checked Out’ WHEN c.[content_status] = ‘I’ THEN ‘Checked In’ WHEN c.[content_status] = ‘S’ THEN ‘Submitted for Approval’ WHEN c.[content_status] = ‘M’ THEN ‘Marked for…

Read More

PowerShell – Enable WinRM

Posted on September 5, 2017September 5, 2017

Not recommended for production computers but this will get the WinRM working on a development computer. Enable-PSRemoting -Force Set-WSManQuickConfig -SkipNetworkProfileCheck winrm set winrm/config/client/auth ‘@{Basic="true"}’ winrm set winrm/config/service/auth ‘@{Basic="true"}’ winrm set winrm/config/service ‘@{AllowUnencrypted="true"}’ Set-Item wsman:\localhost\client\trustedhosts * Winrm enumerate winrm/config/listener Restart-Service WinRM New-NetFirewallRule -DisplayName "Windows Remote Management (HTTPS-In)" -Name "Windows Remote Management…

Read More

PowerShell – PowerShell Installed/Compatible Version

Posted on December 14, 2015

Possibly one of my important commands is to find out what version I have available on the computer. There are various ways to get this and some are rather long and arduous in comparison clear Write-Output "Get-Host (Really Only For 1.0, use once of the two below instead)" get-host |…

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