select FF.Name, vn.foldername, dbo.ve_getShortPath(ItemID) Location
from vefn_getversionformatitems('') vi 
join Contents CC ON CC.ContentID = VI.ContentID
Join vefn_getversionnames() vn on vn.versionid=vi.versionid 
Join Formats FF ON FF.FormatID = VI.FormatID
where cc.Type Between 10000 and 19999 and FF.Name != 'BGEALN'
order by vn.foldername, dbo.ve_getShortPath(ItemID)
