
			SELECT BP.*
			FROM
				b_iblock_property BP
				,b_iblock B
			WHERE BP.IBLOCK_ID=B.ID
			 AND B.ID IN (20) 
			AND ((UPPER(BP.CODE)='SHOW_ON_MAIN_VALUE' AND BP.PROPERTY_TYPE!='L') OR (UPPER(BP.CODE)='SHOW_ON_MAIN' AND BP.PROPERTY_TYPE='L'))