• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ramesh Kanuri
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the relation to JDBC?
 
todd runstein
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 93
Mac Objective C Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic