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 Store Data  in a file in psv(pipe seperated value) format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Store Data  in a file in psv(pipe seperated value) format" Watch "Store Data  in a file in psv(pipe seperated value) format" New topic
Author

Store Data in a file in psv(pipe seperated value) format

Ramesh Kanuri
Greenhorn

Joined: Jul 31, 2006
Posts: 2
Hi,

Please help me in a scenario that my requirement is to store some id(containing multiple date values)s in the file in PSV format.

Please give me the solution for this query.


Regards,
Ramesh K
todd runstein
Ranch Hand

Joined: Feb 15, 2005
Posts: 64
Hmmmm. A PSV file is .... a file. Treat it as text, not a database. Use the File, StringTokenizer/Scanner classes and you should be good.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

What is the relation to JDBC?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
todd runstein
Ranch Hand

Joined: Feb 15, 2005
Posts: 64
What is the relation to JDBC?


In my opinion, there isn't any - or rather, there shouldn't be any - unless you're trying to really overcomplicate things. On the other hand, I've seen JDBC drivers that work with CSV files, so it's certainly possible.
Rusty Smythe
Ranch Hand

Joined: Aug 09, 2006
Posts: 93
Originally posted by Ramesh Kanuri:
store some id(containing multiple date values)s in the file in PSV format.


If I understand you, you want to take some date values, e.g.,

2006-07-22
2006-08-10
2006-08-13
(etc)

And put them in a file as:
2006-07-22|2006-08-10|2006-08-13|(etc)

Is that right?
- If so, how many dates per line?
- How many dates total?
- What are you going to do with this file? (there may be a better way to do it than you think)

If not, please post an example of what you're trying to do.
 
Consider Paul's rocket mass heater.
 
subject: Store Data in a file in psv(pipe seperated value) format