File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 36513
    
  16
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: 36513
    
  16
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
Loading Data in Table
Looking for a database to Java code generator
Can i store bold/italic text modified in JTextpane in Database??
How to preserve new lines when parsing
java code to export mssql data into csv file