File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes importing txt 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 "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 ]
I agree. Here's the link:
subject: importing txt file???
It's not a secret anymore!