0
我有下面的XML,并希望获取所有记录作为行。我的xml就像下面这样..XML查询获取属性作为记录/行
<category ccode="ct8">
<columns>
<col colcode="cl_prodn" displaytext="Prodname" responsetype="textbox" tooltip="testts" isrequired="" displayorder="1" />
<col colcode="cl_descs" displaytext="Descs" responsetype="textarea" tooltip="atser" isrequired="on" displayorder="2" />
</columns>
</category>
我想要两行类ccode = ct8。这两行将显示所有属性。我正在尝试以下查询,但它只返回一个和第一个。
select CatConfig.value('(category/columns/col/@colcode)[1]', 'varchar(50)') from categories where CategoryId = 8
感谢您的投入。真的有帮助。 – 2013-05-08 06:59:49
没问题,你的粉碎好运。 – djangojazz 2013-05-08 15:22:40