This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 and Relational Databases
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: 43399
    
  32
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: 43399
    
  32
avani vakharwala welcome to JavaRanch

And thank you.
 
Consider Paul's rocket mass heater.
 
subject: export query from table column to text file
 
jQuery in Action, 3rd edition