
			select
				Evn.Evn_id as "Evn_id",
				Evn.Evn_pid as "Evn_pid",
				Evn.Evn_rid as "Evn_rid",
				Evn.EvnClass_id as "EvnClass_id",
				Evn.EvnClass_SysNick as "EvnClass_SysNick",
				EvnXml.EvnXml_id as "EvnXml_id",
				EvnXml.Evn_id as "Evn_id_xml",
				EvnXml.XmlType_id as "XmlType_id",
				EvnXml.EvnXml_Name as "EvnXml_Name",
				EvnXml.EvnXml_Data as "EvnXml_Data",
				xts.XmlTemplateSettings_Settings as "XmlTemplate_Settings",
				xth.XmlTemplateHtml_HtmlTemplate as "XmlTemplate_HtmlTemplate",
				xtd.XmlTemplateData_Data as "XmlTemplate_Data",
				EvnXml.XmlTemplate_id as "XmlTemplate_id",
				EvnXml.XmlTemplateType_id as "XmlTemplateType_id",
				EvnXml.EvnXml_IsSigned as "EvnXml_IsSigned",
				'182186648461e7155691523' as "instance_id"
			from v_EvnXml EvnXml
					inner join v_Evn Evn on Evn.Evn_id = EvnXml.Evn_id
				left join XmlTemplateData xtd on xtd.XmlTemplateData_id = EvnXml.XmlTemplateData_id
				left join XmlTemplateHtml xth on xth.XmlTemplateHtml_id = EvnXml.XmlTemplateHtml_id
				left join XmlTemplateSettings xts on xts.XmlTemplateSettings_id = EvnXml.XmlTemplateSettings_id
			where EvnXml.EvnXml_id = '500801000881541'
			order by EvnXml.EvnXml_Index desc
			limit 1
		
