I have below xml and want to fetch all records as rows. My xml is like below..
<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>
I want two rows for category ccode = ct8. Those two rows will show all attributes. I am trying with below query but it returns only one and first.
select CatConfig.value('(category/columns/col/@colcode)[1]', 'varchar(50)') from categories where CategoryId = 8