Skip to content
Advertisement

Need a where clause for an XML Node in a SQL Server 2019 stored procedure

I have 1.5 million XML documents stored in a SQL Server 2019 database and I need to have a where clause that has multiple nodes in a stored procedure.

I need to pull all XML files where PI_ID equals 9983950. The number of PI’s in the PIS node could be one or 5.

I’m using this code:

when I need the city but I’m not sure how to find the value when there are multiple nodes

Advertisement

Answer

Please try the following solution.

SQL

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement