?
Solved

Help with some SQL to import one table to another table

Posted on 2012-03-28
2
Medium Priority
?
444 Views
Last Modified: 2012-06-21
Hi There,
I have successfully imported some products from a virtuemart shopping cart (version 1.1.4, joomla 1.5) to a new install of joomla 2.5 virtuemart 2.0.2.

I did this using csv improved.

My only issue is I cannot seem to get the image paths imported across or the product descriptions.

So i was thinking I could get my hands dirty and do a direct import into the database.

Can anyone help me do this?
0
Comment
Question by:Amanda Watson
2 Comments
 
LVL 24

Accepted Solution

by:
johanntagle earned 2000 total points
ID: 37780520
Are they on the same mysql instance?  Then you can just do something like

insert into new_db.new_table (col1, col2, col3) select col1, col2, col3 from old_db.old_table <optional where clause here>;

You just need a user that has access to both databases/schemas.  If they are not on the same mysql instance, do a mysqldump (or export from phpmyadmin as sql statements) of the needed tables from the old database, import to a temporary database on the new mysql instance, then do the same insert operations above.
0
 
LVL 11

Author Closing Comment

by:Amanda Watson
ID: 37783702
Thanks that would have worked, I ended up having a folder permission issue with csv import, and that solved it for me, but your solution would have worked for me also.
Thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question