Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL Server + XML pac.row.value

Author  Topic 

vrsanaidu9
Starting Member

1 Post

Posted - 2011-01-24 : 05:11:07
Hi,

In my project, someone has written code something like below.


DECLARE @EIDsXml xml
SET @EIDsXml=N'<EID><Data ID="90000"/></EID>'
SELECT pac.row.value('@ID','int')
FROM @EIDsXml.nodes('/EID/Data') as pac

i am able to run above query without any issues. but i could not understand what is pac.row.value, and could not find in google.com.

please help me in understanding above query.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-01-24 : 10:18:40
pac is alias for xml. by default nodes of xml will be named row hence .row. you can rename it if you want.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -