Wednesday 9 October 2013

04. The production of a bicycle at AdventureWorks involves a number of phases. In each phase, the bicycle is moved to a different work center. The details of all the work centers are stored in the Production.ProductModel table. Bicycles of different types pass through different work centers, depending on the components that need to be fitted. The management wants a list of all the types of bicycles that go through work center 10. How will you generate this list?

With
XMLNamespaces('http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/
ProductModelManulnstructions'as pd)
select ProductModelID from Production.ProductModel
Where Instructions.exist('pd:root/pd:Location[@LocationID=10]')=1

No comments:

Post a Comment