DELETE FROM #variables.databaseTableName# WHERE path = and wiki = select categories from #variables.databaseTableName# p1 where (version = (select max(p2.version) from #variables.databaseTableName# p2 where p1.path = p2.path and p2.wiki = )) and wiki = select path from #variables.databaseTableName# p1 where (version = (select max(p2.version) from #variables.databaseTableName# p2 where p1.path = p2.path and p2.wiki = )) AND path like 'Special.Files.%' and wiki = order by path select id from #variables.databaseTableName# where path = and wiki = and version = select max(version) as maxversion from #variables.databaseTableName# where path = and wiki = select id, path, body, datetimecreated, author, version, summary, categories, authrolestoview, authrolestoedit from #variables.databaseTableName# p1 where (version = (select max(p2.version) from #variables.databaseTableName# p2 where p1.path = p2.path and p2.wiki = )) and (path LIKE and wiki = ) order by p1.path asc select id, path, body, datetimecreated, author, version, summary, categories, authrolestoview, authrolestoedit from #variables.databaseTableName# p1 where (version = (select max(p2.version) from #variables.databaseTableName# p2 where p1.path = p2.path and p2.wiki = )) AND categories like and wiki = order by path asc select id, body, datetimecreated, author, version, summary, categories, authrolestoview, authrolestoedit from #variables.databaseTableName# where path = and wiki = order by datetimecreated DESC select id, path, body, datetimecreated, author, version, summary, categories, authrolestoview, authrolestoedit from #variables.databaseTableName# p1 where (version = (select max(p2.version) from #variables.databaseTableName# p2 where p1.path = p2.path and p2.wiki = )) AND ( authrolestoview = OR authrolestoview IS NULL OR authrolestoview LIKE OR ) and wiki = order by p1.path asc select TOP #arguments.numPages# id, path, body, datetimecreated, author, version, summary, categories, authrolestoview, authrolestoedit from #variables.databaseTableName# p1 where (version = (select max(p2.version) from #variables.databaseTableName# p2 where p1.path = p2.path and p2.wiki = )) AND DATEDIFF(DAY, GETDATE(), dateTimeCreated) < dateTimeCreated > DATE_SUB(NOW(), INTERVAL #arguments.numDays# DAY) (SYSDATE - dateTimeCreate) < AND ROWNUM <= #arguments.numPages# AND ( authrolestoview = OR authrolestoview IS NULL OR authrolestoview LIKE OR ) and wiki = ORDER BY dateTimeCreated DESC LIMIT #arguments.numPages# select path from #variables.databaseTableName# p1 where (version = (select max(p2.version) from #variables.databaseTableName# p2 where p1.path = p2.path and p2.wiki = )) AND path like 'Special.Templates.%' and wiki = order by path select id, path, body, datetimecreated, author, version, summary, categories, authrolestoview, authrolestoedit from #variables.databaseTableName# p1 where (version = (select max(p2.version) from #variables.databaseTableName# p2 where p1.path = p2.path and p2.wiki = )) AND body LIKE ESCAPE '\' body LIKE AND ( authrolestoview = OR authrolestoview IS NULL OR authrolestoview LIKE OR ) and wiki = ORDER BY p1.path ASC UPDATE #variables.databaseTableName# SET path = WHERE path = and wiki = select id, path, body, datetimecreated, author, version, summary, categories, authrolestoview, authrolestoedit from #variables.databaseTableName# p1 where (version = (select max(p2.version) from #variables.databaseTableName# p2 where p1.path = p2.path and p2.wiki = )) and ( path like or body like or summary like or author like ) and wiki = AND ( authrolestoview = OR authrolestoview IS NULL OR authrolestoview LIKE OR ) order by p1.path asc