Translating the XML document on the server

Invoked from the server, the following SQL script invokes the OrderXml constructor to generate an XML Order document from the SQL tables, and then invokes the method OX.sql2Order( ), which extracts the Order data from the generated XML and inserts it into the orders_received table.

declare @xmlorder OrderXml
select @xmlorder = new OrderXml('19990704', '123','') 
select  @xmlorder>>order2Sql('orders_received', '')