2009. 11. 2. 15:51
.NET Framework
Select
1 AS Tag,
0 AS Parent,
67 AS [Ubion!1!cspNo],
1 AS Tag,
0 AS Parent,
67 AS [Ubion!1!cspNo],
NULL AS [Absent!2!id],
NULL AS [Attendance!3!site],
NULL AS [Attendance!3!pc_no], --> Attribute 타입 지정
NULL AS [Attendance!3!card_no!cdata], --> CDATA 형식의 Element 타입 지정
NULL AS [Attendance!3!ab_set_dt!ELEMENT], --> 일반 형식의 Element 타입 지정
NULL AS [Attendance!3!att_time!ELEMENT]
UNION ALL
SELECT
2 AS Tag,
1 As Parent,
NULL, --// Tag 1 에서 지정됨(Ubion Root)
NULL, --// Absent에서 지정됨 Tag 2
NULL, NULL, NULL, NULL, NULL
UNION ALL
SELECT top 5
3 AS Tag,
2 As Parent,
NULL, --// Absent에서 지정됨 Tag 2
NULL,
site, pc_no, card_no, ab_set_dt, att_time
FROM TB_Absent_Attendance
FOR XML EXPLICIT