Hi, I've had to do this several times. So far I've found no simple answer/way. This is how I do it. a) export excel file to tab seperated file. b) Import complete csv/text file into a table using copy. ( Eg. temp_table ) c) Select from that temp table into new tables to build the new database. Here's and example script: INSERT INTO grounds ( gt_id, reg_id, g_name, g_address1, g_country, g_phone, g_fax, g_email, g_url, g_notes, g_activities, g_username, g_pwd ) SELECT 1, 1, name, location, 'Australia', phone, fax, email_address, domain_name, notes, activities, 'username', 'pwd' FROM import_temp; Sometimes SQL is not enough and I use scripts written in PHP or Perl or ColdFusion. I save all my import scripts. eg. import01.sql, import02.sql, import03.php, so that I can easily reuse them. Hope this brief response helps. Cheers Rudi. Devi Munandar wrote:
|
- [ADMIN] exporting data Sidar Lopez Cruz
- Re: [ADMIN] exporting data Devi Munandar
- Rudi Starcevic