Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

OPEN XML Join

By William Mendoza,

Copy/paste the query and run it

Commenting out

--join
--OPENXML (@DocHandle, '/customers/employee',2)
-- WITH ([employee name] varchar(50) 'name',
-- [employee id] varchar(50) '@emp') g
--on w.[customer name]=g.[employee name

should give you

in the query we have @emp and @cust; the reason we put @(amp) is because we use it when the field is inside the tag. It is case sensitive.

 

if you use the exact name as the tag like in( id )you do not need to type the node after( int)

 

I hope this script is helpfull..

Total article views: 976 | Views in the last 30 days: 4
 
Related Articles
FORUM

sql query need Help about Absent Employee

Query about absent employee

ARTICLE

Employee Slurping

This editorial was originally published on Oct 21, 2006. It is being re-run as Steve is out at SQL i...

ARTICLE

Employee Retention

A SQL Server DBA seems to be a stable job and many of us stick with the same job for an above averag...

BLOG

Employee or 1099?

My friend Wes Dumey does a lot of work in the business intelligence sector as a contract employee an...

FORUM

Employee job mapping

Soln required for employee and job mapping query

Tags
openxml    
xml    
 
Contribute