下面是SQL中的查询,我想将其隐藏到SYBASE查询中。 我是Sybase的新手,无法找到适当的帮助或示例来转换此查询。
INSERT INTO @ClientTree
SELECT tmp.ID,
V.NAME,
t.c.value('(./@Id)[1]', 'varchar(32)'),
t.c.value('(./ObjReference[1]/@TargetId)[1]', 'varchar(32)')
FROM
(SELECT ID, CAST(CAST(BM.CONTENT AS VARBINARY) AS XML) AS MyContentXML
FROM MyData BM WHERE TYPE = 'SemClientGroupTree' AND DELETED = 1) tmp
CROSS APPLY tmp.ContentXML.nodes('//SemClientGroup') t(c)
INNER JOIN V_GROUPS V ON V.ID = t.c.value('(./@Id)[1]', 'varchar(50)')
上述查询将数据插入SQL数据库的临时表ClientTree中,我想在SYBASE数据库上运行相同的查询以生成相同的输出。