This commit is contained in:
2023-05-09 18:21:47 +00:00
parent dc9eca0953
commit 3dd59e20d8
118 changed files with 12010 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
SELECT * FROM (
Select FormatID, Name
, v.value('./@Index', 'int') MyIndex
, v.value('./@TabFormat', 'varchar(255)') TabFormat
--, v.value('./@PrintTabFormat', 'varchar(255)') PrintTabFormat
FROM Formats
CROSS APPLY Data.nodes('//SeqTabFmt') TempXML(v)
) AS SRC
PIVOT( Max(TabFormat) FOR MyIndex IN (
[0], [1],[2],[3],[4],[5],[6],[7],[8]
)) AS PVT1 Order by FormatID
SELECT Max(MyIndex) FROM (
Select FormatID, Name
, v.value('./@Index', 'int') MyIndex
, v.value('./@TabFormat', 'varchar(255)') TabFormat
--, v.value('./@PrintTabFormat', 'varchar(255)') PrintTabFormat
FROM Formats
CROSS APPLY Data.nodes('//SeqTabFmt') TempXML(v)
) AS SRC