Hi
At present we have a denormalised database. ie
Name|NameID|EmployeeID|EmployeeType
I'm normalising the database to resolve the EmployeeID from the Employee table rather than the Name Table.
So we have a select at the moment
SELECT Name, NameID, EmployeeID, EmployeeType FROM Name
FOR XML AUTO
Which will output:
<Name Name='Fred' NameID='1' EmployeeID='1' EmployeeType='Manager'>
Now I have an INNER JOIN
SELECT Name, NameID, Name.EmployeeID, Employee.EmployeeType FROM Name
INNER JOIN Employee ON Name.EmployeeID = Employee.EmployeeID
FOR XML AUTO
Now my XML looks like this:
<Name Name='Fred' NameID='1' EmployeeID='1'>
<Employee EmployeeType='Manager' />
</Name>
My question is , is there any way to get XML AUTO to output my XML as before, or do i have to move to XML Explicit?