开发者

conversion of sql queries to xml format

Is there any tool or open source code to convert the sql queries [not the query results] to xml.

Example : if i have a sq开发者_Python百科l query like select * from employee where empname='jon'. I want to generate this query in xml format like

<root>
   <selectclause>
        <field table=''....>
   </selectclause>
</root>

Any plugins or open source code links are needed.

I am using SQL Server & need to extend to MySQL Databases also. However, i code for .Net Framework 4 in C#


select Customer_ID, Short_Name, Phone, Area,
    sum(case when DATEDIFF(dd,Invoice_Date,GETDATE()) <= 21  then Balance end) '21 days',
    sum(case when DATEDIFF(dd,Invoice_Date,GETDATE()) > 21 then Balance end) 'More than 21 days',
    '' Visted, '' DLI, '' Collection
  from vw_pending_invoice 
where route = 1
  group by Customer_ID, Short_Name, Phone, Area 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜