SQL Server Forums
Profile | Register | 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
 Other SQL Server 2008 Topics
 txt to xml
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nord
Posting Yak Master

122 Posts

Posted - 09/12/2013 :  11:49:11  Show Profile  Reply with Quote
Hi,
I would like convert txt file to xml file,I received flat file from ssis and would like convert to xml ,anu idea?
Thanks

James K
Flowing Fount of Yak Knowledge

3569 Posts

Posted - 09/12/2013 :  12:56:40  Show Profile  Reply with Quote
quote:
Originally posted by nord

Hi,
I would like convert txt file to xml file,I received flat file from ssis and would like convert to xml ,anu idea?
Thanks

If you just have a text file on the OS, you probably should write a C# (or Java or some other langauge) program to do the conversion.

Or has the file been imported into a SQL Server? If it has, post details about the table(s) and some sample data.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52309 Posts

Posted - 09/12/2013 :  15:47:49  Show Profile  Reply with Quote
quote:
Originally posted by nord

Hi,
I would like convert txt file to xml file,I received flat file from ssis and would like convert to xml ,anu idea?
Thanks


you can BULK INSERT txt data to sql table and then use t-sql FOR XML syntax to convert data to xml.

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

nord
Posting Yak Master

122 Posts

Posted - 09/12/2013 :  15:54:36  Show Profile  Reply with Quote
Thanks!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.05 seconds. Powered By: Snitz Forums 2000