Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Convert XML File

Author  Topic 

JanakiRam
Starting Member

22 Posts

Posted - 2013-06-18 : 00:02:28
How to convert sql file to xml file

JanakiRam

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-06-18 : 00:21:56
quote:
Originally posted by JanakiRam

How to convert sql file to xml file

JanakiRam


What it means? Can you elaborate the requirement

--
Chandu
Go to Top of Page

JanakiRam
Starting Member

22 Posts

Posted - 2013-06-18 : 00:26:17
Means need a query convert to sql file to xml file

like using FOR XML Concept

<tbl_Advances_EmployeeRepaymentDetails>
<RepaymentDetailId>1</RepaymentDetailId>
<AdvanceMasterId>1</AdvanceMasterId>
<InstallmentModeId>1</InstallmentModeId>
<NoOfInstallments>5</NoOfInstallments>
<AmountPerMonth>0.00</AmountPerMonth>
<StartDate>2011-01-01T00:00:00</StartDate>
<EndDate>2011-05-01T00:00:00</EndDate>
<ActiveYN>1</ActiveYN>
<DeletedYN>0</DeletedYN>
<CreatedOn>2011-06-09T13:03:35.767</CreatedOn>
<CreatedBy>369</CreatedBy>
<LastUpdatedOn>2011-06-09T13:03:35.767</LastUpdatedOn>
<LastUpdatedBy>369</LastUpdatedBy>
<StartMonthId>552</StartMonthId>
<EndMonthId>556</EndMonthId>
<StartYearId>1560</StartYearId>
<EndYearId>1560</EndYearId>

JanakiRam
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-18 : 00:26:37
quote:
Originally posted by JanakiRam

How to convert sql file to xml file

JanakiRam



you can use FOR XML for converting the query results of .sql file to XML.
http://msdn.microsoft.com/en-us/library/ms178107.aspx

If you want to give file itself as input you can use sqlcmd

http://msdn.microsoft.com/en-us/library/ms170572.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

JanakiRam
Starting Member

22 Posts

Posted - 2013-06-18 : 00:42:56
Thank you.....

JanakiRam
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-18 : 00:47:02
quote:
Originally posted by JanakiRam

Thank you.....

JanakiRam


welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -