Tables of Regulations and Other Statutory Instruments of Nunavut

select f.ID, f.fkDocumentGroup, c.blnPrivate, t.strName as strCategory, f.strFileName, ff.strFileName as strAltFileName, ff.fkLanguageID as idLang, l.strLanguage, f.strThumbnail, f.dtUploaded, f.strTitle, f.strAnnotation, f.strDescription, UPPER(t.strName || '/' || f.strDspOrder || f.strTitle) as strKey from tblCategories c LEFT JOIN tblUploadFile f ON c.ID = f.fkCategoryID and f.fkLanguageID = 1 LEFT JOIN tblI18nText t on t.fkForeign=f.fkCategoryID and t.fkLanguage=1 LEFT JOIN tblUploadFile ff on f.fkDocumentGroup = ff.fkDocumentGroup LEFT JOIN tblLanguages l on l.ID=ff.fkLanguageID LEFT JOIN tblI18nText eng on eng.fkForeign=f.fkCategoryID and eng.fkLanguage=1 WHERE c.blnActive = 1 AND f.blnActive=1 AND ((t.strName || '/.') LIKE N'Current Tables/Regulations/%' OR (eng.strName || '/.') LIKE N'Current Tables/Regulations/%') order by t.strName,f.dtUploaded,strTitle,idLang