| Author |
problem in insert mulpitle rows
|
chain singh
Ranch Hand
Joined: Feb 28, 2012
Posts: 116
|
|
Hello
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
('chain','singh','bika.gmailll'),
('chain','singh','bikaccccc.gmailll');
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
Greenhorn
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.
|
 |
 |
|
|
subject: problem in insert mulpitle rows
|
|
|