I have a table with an XML Column called Vehicle.
The XML looks like this:
<type color="red" make="honda" year="2019">
<dealer address="1234 Cat Drive">
<dealer address="1944 Dog Drive">
For example, I want to select a row based on the address value:
How do I select all data from the XML where the address equals
1234 Cat Drive
What I have tried:
So far what I tried is using the query method.
But there has to be a better way, I also see a lot of web examples but nothing specific to how I can get a row by passing a value.
SELECT Vehicles.query('/vehicles/sedan/type/dealers/dealer[@address="1944 Dog Drive"]')