﻿<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://dh.aks.ac.kr/Edu/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ko">
		<id>https://dh.aks.ac.kr/Edu/wiki/index.php?action=history&amp;feed=atom&amp;title=ITKC_convert_sql</id>
		<title>ITKC convert sql - 편집 역사</title>
		<link rel="self" type="application/atom+xml" href="https://dh.aks.ac.kr/Edu/wiki/index.php?action=history&amp;feed=atom&amp;title=ITKC_convert_sql"/>
		<link rel="alternate" type="text/html" href="https://dh.aks.ac.kr/Edu/wiki/index.php?title=ITKC_convert_sql&amp;action=history"/>
		<updated>2026-05-21T01:04:00Z</updated>
		<subtitle>이 문서의 편집 역사</subtitle>
		<generator>MediaWiki 1.23.13</generator>

	<entry>
		<id>https://dh.aks.ac.kr/Edu/wiki/index.php?title=ITKC_convert_sql&amp;diff=77460&amp;oldid=prev</id>
		<title>2018년 8월 10일 (금) 06:42에 대한 Hiblue의 편집</title>
		<link rel="alternate" type="text/html" href="https://dh.aks.ac.kr/Edu/wiki/index.php?title=ITKC_convert_sql&amp;diff=77460&amp;oldid=prev"/>
				<updated>2018-08-10T06:42:13Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2018년 8월 10일 (금) 06:42 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;117번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;117번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--period&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--period&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;select &lt;/del&gt;시대_한자, 시대_한글 from 번역연호 group by 시대_한글, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;시대_한자&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;--period&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;create table k_period (id INT IDENTITY(1,1) not null, 시대_한글 nvarchar(100), &lt;/ins&gt;시대_한자 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;nvarchar(100)&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;지역 nvarchar(100), first int, last int) &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;insert into k_period select &lt;/ins&gt;시대_한글&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, 시대_한자, 지역, min(서기) as first, max(서기) as last &lt;/ins&gt;from 번역연호 group by 시대_한글, 시대_한자&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, 지역&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;select * from 번역연호 &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;--period class &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	select &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;* from k_dynasty where 지역=&lt;/del&gt;'&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;일본&lt;/del&gt;'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	select '&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;http://db.itkc.or.kr/time#period&lt;/ins&gt;'&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2002/07/owl#class&amp;gt;', '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#Period&amp;gt;'&amp;#160;  from k_period&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	select &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;t, count&lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;) from &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;(&lt;/del&gt;select &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;distinct &lt;/del&gt;'&amp;lt;http://db.itkc.or.kr/time#&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;dynasty&lt;/del&gt;'+cast(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;k_dynasty.&lt;/del&gt;id as nvarchar)+'&amp;gt;' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;as s&lt;/del&gt;, '&amp;lt;http://www.w3.org/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;2006&lt;/del&gt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;time&lt;/del&gt;#&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;inside&lt;/del&gt;&amp;gt;' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;as r&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt; &lt;/del&gt;'&amp;lt;http://db.itkc.or.kr/time#&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;emperor&lt;/del&gt;'+cast(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;k_emperor.&lt;/del&gt;id as nvarchar)+'&amp;gt;' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;as t from k_dynasty&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;k_emperor where k_emperor&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;나라_한글=k_dynasty&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;나라_한글 and k_emperor&lt;/del&gt;.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;나라_한자 &lt;/del&gt;= &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;k_dynasty.나라_한자) a group by t order by count(*) desc&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	--period label &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	select &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'&amp;lt;http://db.itkc.or.kr/time#period'+cast&lt;/ins&gt;(&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;id as nvarchar&lt;/ins&gt;)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;+'&amp;gt;', '&amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt;', '&amp;quot;'+시대_한글+'&amp;quot;@ko' &lt;/ins&gt;from &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;k_period where 시대_한글 &amp;lt;&amp;gt; 'NULL'&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	&lt;/ins&gt;select '&amp;lt;http://db.itkc.or.kr/time#&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;period&lt;/ins&gt;'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2000&lt;/ins&gt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;01/rdf-schema&lt;/ins&gt;#&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;label&lt;/ins&gt;&amp;gt;', &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'&amp;quot;'+시대_한자+'&amp;quot;@hanja' from k_period where 시대_한글 &amp;lt;&amp;gt; 'NULL'&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	--period nation&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	select &lt;/ins&gt;'&amp;lt;http://db.itkc.or.kr/time#&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;period&lt;/ins&gt;'+cast(id as nvarchar)+'&amp;gt;', &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'&amp;lt;http://dh&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;aks&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ac&lt;/ins&gt;.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;kr/ontologies/dhtime#nation&amp;gt;', case when 지역&lt;/ins&gt;=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'한국' then '&amp;quot;korean&amp;quot;^^xsd:string' when 지역='중국' then '&amp;quot;chinese&amp;quot;^^xsd:string' when 지역='일본' then '&amp;quot;japanese&amp;quot;^^xsd:string' end from k_period 	&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	select * from k_dynasty&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	--period hasBeginning year&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	 select distinct '&amp;lt;http://db.itkc.or.kr/time#period'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasBeginning&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(first as nvarchar)+'&amp;gt;' from k_period&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	--period hasEnd year&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	 select distinct '&amp;lt;http://db.itkc.or.kr/time#period'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasEnd&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(last as nvarchar)+'&amp;gt;' from k_period&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	--period inside year&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	select distinct '&amp;lt;http://db.itkc.or.kr/time#period'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#inside&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(번역연호.서기 as nvarchar)+'&amp;gt;' from k_period, 번역연호 where 서기 &amp;gt;= first and 서기&amp;lt;=last&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	--period inside era (inverse of period)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	select distinct '&amp;lt;http://db.itkc.or.kr/time#period'+cast(k_period.id as nvarchar)+'&amp;gt;' as period, '&amp;lt;http://www.w3.org/2006/time#inside&amp;gt;' as inside, '&amp;lt;http://db.itkc.or.kr/time#era'+cast(k_era.id as nvarchar)+'&amp;gt;' as era from k_period, 번역연호, k_era where k_period.시대_한글=번역연호.시대_한글 and k_period.지역=번역연호.지역 and k_era.휘이름=번역연호.휘이름 and k_era.연호=번역연호.연호&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	select * from &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;k_emperor&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	--period inside emperor (inverse of period)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	 select distinct '&amp;lt;http://db.itkc.or.kr/time#period'+cast(k_period.id as nvarchar)+'&amp;gt;' as period, '&amp;lt;http://www.w3.org/2006/time#inside&amp;gt;' as inside, '&amp;lt;http://db.itkc.or.kr/time#era'+cast(k_emperor.id as nvarchar)+'&amp;gt;' as era from k_period, 번역연호, k_emperor where k_period.시대_한글=번역연호.시대_한글 and k_period.지역=번역연호.지역 and k_emperor.휘이름=번역연호.휘이름 &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	 --period inside dynasty (inverse of period)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;	&amp;#160; select distinct '&amp;lt;http://db.itkc.or.kr/time#period'+cast(k_period.id as nvarchar)+'&amp;gt;' as period, '&amp;lt;http://www.w3.org/2006/time#inside&amp;gt;' as inside, '&amp;lt;http://db.itkc.or.kr/time#era'+cast(k_dynasty.id as nvarchar)+'&amp;gt;' as era from k_period, 번역연호, k_dynasty where k_period.시대_한글=번역연호.시대_한글 and k_period.지역=번역연호.지역 and &lt;/ins&gt;k_dynasty&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.나라_한글=번역연호.나라_한글&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hiblue</name></author>	</entry>

	<entry>
		<id>https://dh.aks.ac.kr/Edu/wiki/index.php?title=ITKC_convert_sql&amp;diff=77450&amp;oldid=prev</id>
		<title>Hiblue: Hiblue 사용자가 ITCK convert sql 문서를 ITKC convert sql 문서로 옮겼습니다</title>
		<link rel="alternate" type="text/html" href="https://dh.aks.ac.kr/Edu/wiki/index.php?title=ITKC_convert_sql&amp;diff=77450&amp;oldid=prev"/>
				<updated>2018-08-10T05:43:05Z</updated>
		
		<summary type="html">&lt;p&gt;Hiblue 사용자가 &lt;a href=&quot;/Edu/wiki/index.php/ITCK_convert_sql&quot; class=&quot;mw-redirect&quot; title=&quot;ITCK convert sql&quot;&gt;ITCK convert sql&lt;/a&gt; 문서를 &lt;a href=&quot;/Edu/wiki/index.php/ITKC_convert_sql&quot; title=&quot;ITKC convert sql&quot;&gt;ITKC convert sql&lt;/a&gt; 문서로 옮겼습니다&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2018년 8월 10일 (금) 05:43 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(차이 없음)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Hiblue</name></author>	</entry>

	<entry>
		<id>https://dh.aks.ac.kr/Edu/wiki/index.php?title=ITKC_convert_sql&amp;diff=77444&amp;oldid=prev</id>
		<title>Hiblue: 새 문서: &lt;pre&gt; use hiblue select * from 번역연호 --year  	--year class year 	select distinct '&lt;http://db.itkc.or.kr/time#year'+cast(서기 as nvarchar)+'&gt;', '&lt;http://www.w3.org/2002/07/owl...</title>
		<link rel="alternate" type="text/html" href="https://dh.aks.ac.kr/Edu/wiki/index.php?title=ITKC_convert_sql&amp;diff=77444&amp;oldid=prev"/>
				<updated>2018-08-10T05:38:28Z</updated>
		
		<summary type="html">&lt;p&gt;새 문서: &amp;lt;pre&amp;gt; use hiblue select * from 번역연호 --year  	--year class year 	select distinct &amp;#039;&amp;lt;http://db.itkc.or.kr/time#year&amp;#039;+cast(서기 as nvarchar)+&amp;#039;&amp;gt;&amp;#039;, &amp;#039;&amp;lt;http://www.w3.org/2002/07/owl...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;새 문서&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
use hiblue&lt;br /&gt;
select * from 번역연호&lt;br /&gt;
--year &lt;br /&gt;
	--year class year&lt;br /&gt;
	select distinct '&amp;lt;http://db.itkc.or.kr/time#year'+cast(서기 as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2002/07/owl#class&amp;gt;', '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#Year&amp;gt;'   from 번역연호 &lt;br /&gt;
	--year dangi&lt;br /&gt;
	select distinct '&amp;lt;http://db.itkc.or.kr/time#year'+cast(서기 as nvarchar)+'&amp;gt;', '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#dangunEra&amp;gt;', '&amp;quot;'+cast(단기 as nvarchar)+'&amp;quot;^^xsd:nonNegativeInteger'   from 번역연호&lt;br /&gt;
	--year ganzhi&lt;br /&gt;
	select distinct '&amp;lt;http://db.itkc.or.kr/time#year'+cast(서기 as nvarchar)+'&amp;gt;', '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#ganzhi&amp;gt;', '&amp;quot;'+substring(간지,0,3)+'&amp;quot;@ko' from 번역연호&lt;br /&gt;
	select distinct '&amp;lt;http://db.itkc.or.kr/time#year'+cast(서기 as nvarchar)+'&amp;gt;', '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#ganzhi&amp;gt;', '&amp;quot;'+substring(간지,4,2)+'&amp;quot;@hanja' from 번역연호&lt;br /&gt;
	--year after year&lt;br /&gt;
	select distinct  '&amp;lt;http://db.itkc.or.kr/time#year'+cast(a.서기 as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#after&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(b.서기 as nvarchar)+'&amp;gt;' from 번역연호 a, 번역연호 b where a.서기=b.서기+1&lt;br /&gt;
	--year before year&lt;br /&gt;
	select distinct  '&amp;lt;http://db.itkc.or.kr/time#year'+cast(a.서기 as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#before&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(b.서기 as nvarchar)+'&amp;gt;' from 번역연호 a, 번역연호 b where a.서기+1=b.서기&lt;br /&gt;
	--year eraYear / emperorYear&lt;br /&gt;
	select distinct  '&amp;lt;http://db.itkc.or.kr/time#year'+cast(서기 as nvarchar)+'&amp;gt;', '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#yearLink&amp;gt;', '_:yearLink'+cast(일련번호 as nvarchar) from 번역연호&lt;br /&gt;
	select distinct '_:yearLink'+cast(일련번호 as nvarchar) , '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#eraYear&amp;gt;', '&amp;quot;'+cast(연호년 as nvarchar)+'&amp;quot;^^xsd:nonNegativeInteger' from 번역연호 where  연호년 is not null&lt;br /&gt;
	select distinct '_:yearLink'+cast(일련번호 as nvarchar) , '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#emperorYear&amp;gt;', '&amp;quot;'+cast(재위년 as nvarchar)+'&amp;quot;^^xsd:nonNegativeInteger' from 번역연호 where  재위년 is not null&lt;br /&gt;
	--year hasYearLink&lt;br /&gt;
	drop table k_era&lt;br /&gt;
--era&lt;br /&gt;
	create table k_era (id INT IDENTITY(1,1) not null, 휘이름 nvarchar(100), 연호 nvarchar(100), first int,firstyearlink int, last int,lastyearlink int)&lt;br /&gt;
	insert into k_era select 휘이름, 연호, min(서기), min(일련번호), max(서기), max(일련번호) from 번역연호 group by 휘이름, 연호 having 연호 is not null&lt;br /&gt;
	select * from k_era&lt;br /&gt;
	--era class era&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#era'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2002/07/owl#class&amp;gt;', '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#Era&amp;gt;'   from k_era&lt;br /&gt;
	--era label&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#era'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt;', '&amp;quot;'+substring(연호,0,CHARINDEX ('(',연호))+'&amp;quot;@ko' from k_era&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#era'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt;', '&amp;quot;'+substring(연호,CHARINDEX ('(',연호)+1,len(연호)-CHARINDEX ('(',연호)-1)+'&amp;quot;@hanja' from k_era&lt;br /&gt;
	--era hasBeginning year&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#era'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasBeginning&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(first as nvarchar)+'&amp;gt;' from  k_era&lt;br /&gt;
	--era hasEnd year&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#era'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasEnd&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(last as nvarchar)+'&amp;gt;' from  k_era&lt;br /&gt;
	--era inside year&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#era'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#inside&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(last as nvarchar)+'&amp;gt;' from  k_era, 번역연호 where 서기&amp;lt;=last and 서기&amp;gt;=first &lt;br /&gt;
	--era inside yearLink&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#era'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#inside&amp;gt;', '_:yearLink'+cast(일련번호 as nvarchar) from  k_era, 번역연호 where 서기&amp;lt;=last and 서기&amp;gt;=first and  k_era.연호=번역연호.연호 and k_era.휘이름=번역연호.휘이름&lt;br /&gt;
	--era hasBeginning yearLjnk&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#era'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasBeginning&amp;gt;', '_:yearLink'+cast(일련번호 as nvarchar) from  k_era, 번역연호 where 서기=first and  k_era.연호=번역연호.연호 and k_era.휘이름=번역연호.휘이름&lt;br /&gt;
	--era hasEnd yearLjnk&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#era'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasEnd&amp;gt;', '_:yearLink'+cast(일련번호 as nvarchar) from  k_era, 번역연호 where 서기=first and  k_era.연호=번역연호.연호 and k_era.휘이름=번역연호.휘이름&lt;br /&gt;
&lt;br /&gt;
	--쿼리문 고민...&lt;br /&gt;
		--era before era&lt;br /&gt;
		--era after era&lt;br /&gt;
		select '&amp;lt;http://db.itkc.or.kr/time#era'+cast(a.id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#before&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#era'+cast(b.id as nvarchar)+'&amp;gt;' from k_era a, k_era b where a.last=b.first+1 and a.휘이름=b.휘이름 and a.id &amp;lt;&amp;gt; b.id&lt;br /&gt;
&lt;br /&gt;
drop table k_emperor&lt;br /&gt;
	&lt;br /&gt;
--emperor&lt;br /&gt;
	create table k_emperor (id INT IDENTITY(1,1) not null, 휘이름 nvarchar(100), 묘호_한글 nvarchar(100), 묘호_한자  nvarchar(100), 시호_한글 nvarchar(100), 시호_한자 nvarchar(100), 나라_한글 nvarchar(100), 나라_한자 nvarchar(100), 지역 nvarchar(100),   first int,firstyearlink int, last int,lastyearlink int)&lt;br /&gt;
	insert into k_emperor select 휘이름, 묘호_한글, 묘호_한자, 시호_한글, 시호_한자, 나라_한글, 나라_한자, 지역, min(서기) as first, min(일련번호) as firstyearlink, max(서기) as last, max(일련번호) as lastyearlink from 번역연호 group by 휘이름, 묘호_한글,묘호_한자, 시호_한글, 시호_한자, 나라_한글, 나라_한자, 지역&lt;br /&gt;
	select * from k_emperor&lt;br /&gt;
	--emperor class emperor	&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2002/07/owl#class&amp;gt;', '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#Emperor&amp;gt;'   from k_emperor&lt;br /&gt;
	--emperor label&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt;', '&amp;quot;'+substring(휘이름,0,CHARINDEX ('(',휘이름))+'&amp;quot;@ko' from k_emperor where 휘이름 &amp;lt;&amp;gt; 'null'&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt;', '&amp;quot;'+substring(휘이름,CHARINDEX ('(',휘이름)+1,len(휘이름)-CHARINDEX ('(',휘이름)-1)+'&amp;quot;@hanja' from k_emperor where 휘이름 is not null&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt;', '&amp;quot;'+묘호_한글+'&amp;quot;@ko' from k_emperor where 묘호_한글 is not null&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt;', '&amp;quot;'+묘호_한자+'&amp;quot;@hanja' from k_emperor where 묘호_한자 is not null&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt;', '&amp;quot;'+시호_한글+'&amp;quot;@ko' from k_emperor where 시호_한글 is not null&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt;', '&amp;quot;'+시호_한자+'&amp;quot;@hanja' from k_emperor where 시호_한자 is not null&lt;br /&gt;
	--emperor hasBeginning year&lt;br /&gt;
	select distinct '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasBeginning&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(first as nvarchar)+'&amp;gt;' from k_emperor&lt;br /&gt;
	--emperor hasEnd year&lt;br /&gt;
	select distinct '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasEnd&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(last as nvarchar)+'&amp;gt;' from k_emperor&lt;br /&gt;
	--emperor inside year&lt;br /&gt;
	select distinct '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#inside&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(번역연호.서기 as nvarchar)+'&amp;gt;' from k_emperor, 번역연호 where 서기 &amp;gt;= first and 서기&amp;lt;=last 	&lt;br /&gt;
	--emperor hasbeginning yearLink&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasBeginning&amp;gt;', '_:yearLink'+cast(firstyearlink as nvarchar) from  k_emperor&lt;br /&gt;
	--emperor hasEnd yearLink&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasEnd&amp;gt;', '_:yearLink'+cast(lastyearlink as nvarchar) from  k_emperor&lt;br /&gt;
	--emperor inside yearLink&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#inside&amp;gt;', '_:yearLink'+cast(일련번호 as nvarchar) from  k_emperor, 번역연호 where k_emperor.휘이름 = 번역연호.휘이름 and 일련번호 &amp;gt;= firstyearlink and 일련번호 &amp;lt;= lastyearlink&lt;br /&gt;
	--emperor hasBeginning era&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(k_emperor.id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasBeginning&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#era'+cast(k_era.id as nvarchar)+'&amp;gt;' from  k_emperor, k_era where k_emperor.firstyearlink=k_era.firstyearlink and k_era.휘이름 = k_emperor.휘이름&lt;br /&gt;
		&lt;br /&gt;
	--emperor hasEnd era&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(k_emperor.id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasEnd&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#era'+cast(k_era.id as nvarchar)+'&amp;gt;' from  k_emperor, k_era where k_emperor.lastyearlink=k_era.lastyearlink and k_era.휘이름 = k_emperor.휘이름&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
drop table k_dynasty&lt;br /&gt;
&lt;br /&gt;
--dynasty&lt;br /&gt;
	create table k_dynasty (id INT IDENTITY(1,1) not null, 나라_한글 nvarchar(100), 나라_한자 nvarchar(100), 지역 nvarchar(100), first int, firstyearlink int, last int, lastyearlink int) &lt;br /&gt;
	insert into k_dynasty select 나라_한글, 나라_한자, 지역, min(서기) as first, min(일련번호) as firstyearlink, max(서기) as last, max(일련번호) as lastyearlink from 번역연호 group by  나라_한글, 나라_한자, 지역&lt;br /&gt;
	--dynasty class dynasty&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#dyansty'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2002/07/owl#class&amp;gt;', '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#Dyansty&amp;gt;'   from k_dynasty&lt;br /&gt;
	--dynasty label &lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#dyansty'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt;', '&amp;quot;'+나라_한글+'&amp;quot;@ko' from k_dynasty &lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#dyansty'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2000/01/rdf-schema#label&amp;gt;', '&amp;quot;'+나라_한자+'&amp;quot;@hanja' from k_dynasty&lt;br /&gt;
	--dynasty nation&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#dyansty'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://dh.aks.ac.kr/ontologies/dhtime#nation&amp;gt;', case when 지역='한국' then '&amp;quot;korean&amp;quot;^^xsd:string' when 지역='중국' then '&amp;quot;chinese&amp;quot;^^xsd:string' when 지역='일본' then '&amp;quot;japanese&amp;quot;^^xsd:string' end from k_dynasty &lt;br /&gt;
&lt;br /&gt;
	--dynasty hasBeginning year&lt;br /&gt;
	 select distinct '&amp;lt;http://db.itkc.or.kr/time#dynasty'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasBeginning&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(first as nvarchar)+'&amp;gt;' from k_dynasty&lt;br /&gt;
	--dynasty hasEnd year&lt;br /&gt;
	 select distinct '&amp;lt;http://db.itkc.or.kr/time#dynasty'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasEnd&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(last as nvarchar)+'&amp;gt;' from k_dynasty&lt;br /&gt;
	--dynasty inside year&lt;br /&gt;
	select distinct '&amp;lt;http://db.itkc.or.kr/time#dynasty'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#inside&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#year'+cast(번역연호.서기 as nvarchar)+'&amp;gt;' from k_dynasty, 번역연호 where 서기 &amp;gt;= first and 서기&amp;lt;=last 	&lt;br /&gt;
&lt;br /&gt;
	--dynasty hasBeginning yearLink&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#dynasty'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasBeginning&amp;gt;', '_:yearLink'+cast(firstyearlink as nvarchar) from  k_dynasty&lt;br /&gt;
	--dynasty hasEnd yearLink&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#dynasty'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasEnd&amp;gt;', '_:yearLink'+cast(firstyearlink as nvarchar) from  k_dynasty&lt;br /&gt;
	--dynasty inside yearLink&lt;br /&gt;
	select '&amp;lt;http://db.itkc.or.kr/time#dynasty'+cast(id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasBeginning&amp;gt;',  '_:yearLink'+cast(일련번호 as nvarchar) from  k_dynasty, 번역연호 where k_dynasty.나라_한자 = 번역연호.나라_한자 and 일련번호 &amp;gt;= firstyearlink and 일련번호 &amp;lt;= lastyearlink&lt;br /&gt;
&lt;br /&gt;
	--dynasty hasBeginning emperor&lt;br /&gt;
		select distinct '&amp;lt;http://db.itkc.or.kr/time#dynasty'+cast(k_dynasty.id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasBeginning&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(k_emperor.id as nvarchar)+'&amp;gt;' from k_dynasty, k_emperor where k_emperor.나라_한글=k_dynasty.나라_한글 and k_dynasty.firstyearlink = k_emperor.firstyearlink&lt;br /&gt;
	--dynasty hasEnd emperor&lt;br /&gt;
	select distinct '&amp;lt;http://db.itkc.or.kr/time#dynasty'+cast(k_dynasty.id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#hasEnd&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(k_emperor.id as nvarchar)+'&amp;gt;' from k_dynasty, k_emperor where k_emperor.나라_한글=k_dynasty.나라_한글 and k_dynasty.lastyearlink = k_emperor.lastyearlink&lt;br /&gt;
	--dynasty inside emperor&lt;br /&gt;
		select distinct '&amp;lt;http://db.itkc.or.kr/time#dynasty'+cast(k_dynasty.id as nvarchar)+'&amp;gt;', '&amp;lt;http://www.w3.org/2006/time#inside&amp;gt;', '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(k_emperor.id as nvarchar)+'&amp;gt;' from k_dynasty, k_emperor where k_emperor.나라_한자=k_dynasty.나라_한자 &lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
--period&lt;br /&gt;
select 시대_한자, 시대_한글 from 번역연호 group by 시대_한글,  시대_한자&lt;br /&gt;
&lt;br /&gt;
	select * from 번역연호 &lt;br /&gt;
	select * from k_dynasty where 지역='일본'&lt;br /&gt;
&lt;br /&gt;
	select t, count(*) from (select distinct '&amp;lt;http://db.itkc.or.kr/time#dynasty'+cast(k_dynasty.id as nvarchar)+'&amp;gt;' as s, '&amp;lt;http://www.w3.org/2006/time#inside&amp;gt;' as r,  '&amp;lt;http://db.itkc.or.kr/time#emperor'+cast(k_emperor.id as nvarchar)+'&amp;gt;' as t from k_dynasty, k_emperor where k_emperor.나라_한글=k_dynasty.나라_한글 and k_emperor.나라_한자 = k_dynasty.나라_한자) a group by t order by count(*) desc&lt;br /&gt;
&lt;br /&gt;
	select * from k_dynasty&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Hiblue</name></author>	</entry>

	</feed>