I have not tried a master detail in XML, but definetily I would assume you
would need all of the data relationships to be available in the dat in the
same way as if it was in a database.
My question if you have SQL, why don't you use the data from there instead
of adding another step with the XML?
This seems like a lot of work when the data is in your database already and
can be manipulated there.
Have you looked at the Database Accelerator package from
It allows queries and submits to your database directly.
The Largest InfoPath Forum in the World