XML_TABLE
|
Id |
XML_DATA |
|
1 |
|
I want to populate in the CompanyInfo table using CTE
- WITH mycte AS (
- SELECT
- TRY_CAST([XML_DATA] AS XML)
- FROM [XML_TABLE]
- )
if the AgentName exists, then the City Code should appear along with Name and Adress
CompanyINFO
|
Country |
City Code |
Agent Name |
Address |
|
India |
M |
Agent1 |
PO Box 29150 |
|
Bangladesh |
D |
Agent2 |
|
|
SriLanka |
C |
Agent3 |
Jefferson S. MottaPosted May 19, 2020, 4:13 PM