
			select
				FreeDocMarker_id as "FreeDocMarker_id",
				FreeDocMarker_Name as "FreeDocMarker_Name",
				FreeDocMarker_Description as "FreeDocMarker_Description",
				FreeDocMarker_TableAlias as "FreeDocMarker_TableAlias",
				FreeDocMarker_Field as "FreeDocMarker_Field",
				FreeDocMarker_Query as "FreeDocMarker_Query",
				FreeDocMarker_IsTableValue as "FreeDocMarker_IsTableValue",
				FreeDocMarker_Options as "FreeDocMarker_Options",
				Evn.Evn_id as "Evn_id",
				Evn.Evn_pid as "Evn_pid",
				Evn.Evn_rid as "Evn_rid",
				EvnClass0.EvnClass_SysNick as "EvnClass_SysNick",
				EvnClass0.EvnClass_id as "EvnClass_id0",
				EvnClass1.EvnClass_id as "EvnClass_id1",
				EvnClass2.EvnClass_id as "EvnClass_id2",
				EvnClass3.EvnClass_id as "EvnClass_id3",
				EvnClass4.EvnClass_id as "EvnClass_id4",
				EvnClass5.EvnClass_id as "EvnClass_id5",
				EvnClass6.EvnClass_id as "EvnClass_id6",
				EvnXml.EvnXml_id as "EvnXml_id"
			from
				Evn
				inner join EvnClass EvnClass0 on Evn.EvnClass_id = EvnClass0.EvnClass_id
				left join EvnClass EvnClass1 on EvnClass1.EvnClass_id = EvnClass0.EvnClass_pid
				left join EvnClass EvnClass2 on EvnClass2.EvnClass_id = EvnClass1.EvnClass_pid
				left join EvnClass EvnClass3 on EvnClass3.EvnClass_id = EvnClass2.EvnClass_pid
				left join EvnClass EvnClass4 on EvnClass4.EvnClass_id = EvnClass3.EvnClass_pid
				left join EvnClass EvnClass5 on EvnClass5.EvnClass_id = EvnClass4.EvnClass_pid
				left join EvnClass EvnClass6 on EvnClass6.EvnClass_id = EvnClass5.EvnClass_pid
				left join EvnXml on EvnXml.Evn_id = Evn.Evn_id
				inner join FreeDocMarker on FreeDocMarker.EvnClass_id in (
					EvnClass0.EvnClass_id,
					EvnClass1.EvnClass_id,
					EvnClass2.EvnClass_id,
					EvnClass3.EvnClass_id,
					EvnClass4.EvnClass_id,
					EvnClass5.EvnClass_id,
					EvnClass6.EvnClass_id
				)
			where
				Evn.Evn_id = '500801005614725'
		
