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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Convert XML File
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

JanakiRam
Starting Member

India
22 Posts

Posted - 06/18/2013 :  00:02:28  Show Profile  Reply with Quote
How to convert sql file to xml file

JanakiRam

bandi
Flowing Fount of Yak Knowledge

India
2241 Posts

Posted - 06/18/2013 :  00:21:56  Show Profile  Reply with Quote
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

India
22 Posts

Posted - 06/18/2013 :  00:26:17  Show Profile  Reply with Quote
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

India
52326 Posts

Posted - 06/18/2013 :  00:26:37  Show Profile  Reply with Quote
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

India
22 Posts

Posted - 06/18/2013 :  00:42:56  Show Profile  Reply with Quote
Thank you.....

JanakiRam
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 06/18/2013 :  00:47:02  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.17 seconds. Powered By: Snitz Forums 2000