SELECT MiscID FROM tblMisc WHERE Type = 'Hotline' AND sectionid = #url.sectionID# SELECT * FROM tblSections WHERE Status=1 AND Nav_Order is not null ORDER BY Nav_Order select b.surveyid from tblsections a, tblsurvey b, trelsectionsurvey c where a.type = 3 and a.status=1 and a.sectionid = c.sectionid and c.surveyid = b.surveyid