Hi,

We have a Table called PCMessages. We are not using SQL Server. We are using MSDE.

Code = Varchar(25) - Primary Key, Unique
Message = Varchar(300)
Type = Numeric(15)
Caution = Varchar(300)
Action = Varchar(300)
Additional_Info = Varchar(300)

I want to convert the SQL Table into XML format as shown below using SQL Query. I dont know how to do it. I have used

FOR XML AUTO, ELEMENTS but I cant see the proper output.

<Pactus>
<Module name="Customer">
<code value="CSTACC0001">
<message value="Customer account business name cannot be null for Organization Account"/>
<type value="critical"/>
<action value="If the customer account type is Organization please enter a valid business name"/>
<additionalInformation value="/>
</code>
</Module>
</Pactus>

Hope I can get a solution

Thanks and regards
Rajesh