jenlion
IS-IT--Management
- Nov 13, 2001
- 215
I have XML Data that looks like this.
Over time, there could be more CustMaps, but never very many.
I have a sql table that contains CustID elsewhere, and I will need to use that to come get the NetworkID.
How do I query this? I found t-sql to bring it into a table, so I don't mind doing that, but I'm having a hard time getting the attributes out of there using a query. I haven't done much XML in SQL, I'm just vaguely aware that this is supposed to be "easy".
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<CustomerMapping xmlns:i="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance">[/URL]
<CustMap NetworkId="AN01000018306-T" CustID="Testing" />
<CustMap NetworkId="AN01000018304-T" CustID="Nobody" />
</CustomerMapping>
I have a sql table that contains CustID elsewhere, and I will need to use that to come get the NetworkID.
How do I query this? I found t-sql to bring it into a table, so I don't mind doing that, but I'm having a hard time getting the attributes out of there using a query. I haven't done much XML in SQL, I'm just vaguely aware that this is supposed to be "easy".