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)
Query MediaBin for File Types...
DavidP
Does anyone know if there is a way to directly query MediaBin to get a count of assets and each asset's file type? We are using SQL for the backend database and I have been searching through the assets, assetrefs, revisions, and metadata tables but can't find a direct way to find out the file extensions such as ; .tif, .gif, .jpg, etc.
It looks like the assetrefs.name (may) contain the file extension, but I'd like to know if there is some field in MediaBin that specifically stored the file extension.
I have already created an SSIS package to get the file extensions from the ImageDB file system but want to compare the results to what is stored in MediaBin.
Find more posts tagged with
Comments
msrinivas
I would suggest you explore the SQL report views provided by MB rather than querying the tables directly.
DavidP
I need to query the tables directly in order to create a RS report that can be subscribed to, and possibly provide a side-by-side comparison to data that is not in MediaBin.
DavidP
SELECT COUNT (RIGHT(filename,(LEN(filename)-CHARINDEX('.',filename)))) AS Counts,
RIGHT(filename,(LEN(filename)-CHARINDEX('.',filename))) FileType
FROM InternalFilenames
WHERE LEN(RIGHT(filename,(LEN(filename)-CHARINDEX('.',filename)))) < 4
GROUP BY RIGHT(filename,(LEN(filename)-CHARINDEX('.',filename)))
ORDER BY FileType
msrinivas
Ok. Querying the tables directly is not recommended. Check with support. The tables can change in any way shape or form with a new version. You are better off querying the views that are supported and will be available from version to version.