wood burning stoves 2.0*
The moose likes JDBC and the fly likes export query from table column to text file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "export query from table column to text file" Watch "export query from table column to text file" New topic
Author

export query from table column to text file

aypa genga
Greenhorn

Joined: Nov 26, 2008
Posts: 5
I want to export a single column of a table to a text file. How can i do it with a sql query.
Please help
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38064
    
  22
Use a simple select statement, then write the results to the text file with a FileWriter or Formatter.
avani vakharwala
Greenhorn

Joined: Jan 24, 2008
Posts: 6

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38064
    
  22
avani vakharwala welcome to JavaRanch

And thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: export query from table column to text file
 
Similar Threads
Can i store bold/italic text modified in JTextpane in Database??
java code to export mssql data into csv file
How to preserve new lines when parsing
Looking for a database to Java code generator
Loading Data in Table