This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes importing txt 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 "importing txt file???" Watch "importing txt file???" New topic

importing txt file???

miguel b

Joined: Mar 25, 2004
Posts: 2
hello, i am struggling a bit here, java is not my strength, and i am trying to import a .txt into my SQL db. its a bit difficult to explain...hmmm
the txt file are orders from a sales rep. and i need to add the details to the relevant tables....and then show a summary of that .txt
if any1 can help me out, get me going, anything, would be brilliant. because me and java, we are not getting on too
please ask me if you need more info, you probably do, i am not too sure what i am doing in this java bit
This is the .TXT file i have to import...

## Example Rep File
## Note: any line starting with two ## symbols is a comment
## Begin update line includes the ID of the rep which generated this file
## Begin order line includes order id, shop id and date
## All other lines are order detail lines which include
## book id, quantity and selling prices
BEGIN-ORDER 1 SHOP 1 DATE 2004-02-27
1 10 3.99
7 5 14.99
3 20 0.99
8 10 3.99
BEGIN-ORDER 2 SHOP 3 DATE 2004-03-01
1 5 3.99
5 10 10.99
8 40 2.99

just thought i would add this, its the code i am using to update the DB...might help some1 help me

[ March 25, 2004: Message edited by: miguel b ]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: importing txt file???
Similar Threads
Many-To-One mapping in hibernate using annotations
Exctract cirtain categories of products from XML products file
multiple uses interface
simple menu for jdbc