• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Which SQL Statement should use for that??

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can I Insert a value in one database table to another database table
using JDBC. Please any one have the SQL query like that, and how can I
write that program in Java.
I am using MSAccess 2000.
Thanks,
Fyrose.
 
Ranch Hand
Posts: 8943
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Oracle you can use
insert into table1 select * from table2;
Try this! May it will work! :roll:
 
Ahamed Sharif
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
But I used this query like
String query = " insert into UserInfo (UserName) in 'C:\\User.mdb' select UserInfo from RateInfo";
stmt.executeUpdate(query);
Its inserting the UserName value of the UserInfo table into RateInfo table
the value of UserInfo. But the problem is its inserting the next row.
So the first row will be blank so how can I inser that in a first line.
Could you solve this problem.
Thanks,
Sharief.
 
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
    Bookmark Topic Watch Topic
  • New Topic