wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes problem in insert mulpitle rows 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 "problem in insert mulpitle rows" Watch "problem in insert mulpitle rows" New topic

problem in insert mulpitle rows

chain singh
Ranch Hand

Joined: Feb 28, 2012
Posts: 117

i am inserting multiple row in sqlserver. this query return in a text file
i have to separately insert each row so i have to tokenize the data from query

please help me to tokenize the query which is following

insert into Employee values

and i wanted by code to make

insert into Employee values ('chain','singh','bika.gmailll')
insert into Employee values ('chain','singh','bikaccccc.gmailll')
Eduardo Moranchel

Joined: Jul 31, 2012
Posts: 5
actually you only need a lot of string parsing.
But here it is how you usually do this:

is not the best code (i know) but should point you in the right direction
Also where the system.out.println is is where you need yo add the string to a collection to return it or call directly the insert in the jdbc.
I agree. Here's the link: http://aspose.com/file-tools
subject: problem in insert mulpitle rows
It's not a secret anymore!