我需要从 Universe 数据库生成 XML 文档。这些 XML 文件是 SSIS 包的来源。所以首先我必须生成 XML 文件。为此,我正在使用以下命令。SELECT FIRST 1000 LIST TOXML ELEMENTS 它返回 1000 条记录,很好。我在这里有一些问题,1.我如何指定一个条件来选择只满足的记录a。名称如“S%”(SQL Server)的示例 2. 某些字段具有多个值,例如
<RECORD>
<BRANCH>A</BRANCH>
<SUB_BRANCH>A1</SUBBRANCH>
<SUB_BRANCH>A2</SUBBRANCH>
<SUB_BRANCH>A3</SUBBRANCH>
</RECORD>
<RECORD>
<BRANCH>B</BRANCH>
<SUB_BRANCH>B1</SUBBRANCH>
<SUB_BRANCH>B2</SUBBRANCH>
</RECORD>
<RECORD>
<BRANCH>C</BRANCH>
<SUB_BRANCH>C1</SUBBRANCH>
</RECORD>
从这里我想根据
如下所示:
<RECORD>
<BRANCH>A</BRANCH>
<SUB_BRANCH>A1</SUBBRANCH>
</RECORD>
<BRANCH>A</BRANCH>
<SUB_BRANCH>A2</SUBBRANCH>
</RECORD>
<BRANCH>A</BRANCH>
<SUB_BRANCH>A3</SUBBRANCH>
</RECORD>
<RECORD>
<BRANCH>B</BRANCH>
<SUB_BRANCH>B1</SUBBRANCH>
</RECORD>
<BRANCH>B</BRANCH>
<SUB_BRANCH>B2</SUBBRANCH>
</RECORD>
<RECORD>
<BRANCH>C</BRANCH>
<SUB_BRANCH>C1</SUBBRANCH>
</RECORD>
这可能吗?
谢谢,