• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Which SQL Statement should use for that??

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic