X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 20B6EB42311 for ; Tue, 8 Jul 2003 03:27:11 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 37633-08 for ; Tue, 8 Jul 2003 00:26:59 -0300 (ADT) Received: from water.oasis.net.au (water.oasis.net.au [210.8.139.2]) by svr1.postgresql.org (Postfix) with ESMTP id 07194B42168 for ; Tue, 8 Jul 2003 00:26:58 -0300 (ADT) Received: from oasis.net.au (guardian [210.8.139.5]) by water.oasis.net.au (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id NAA25169 for ; Tue, 8 Jul 2003 13:45:38 +1000 X-Authentication-Warning: water.oasis.net.au: Host guardian [210.8.139.5] claimed to be oasis.net.au Message-ID: <3F0A3A34.6050707@oasis.net.au> Date: Tue, 08 Jul 2003 13:27:48 +1000 From: Rudi Starcevic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: exporting data References: <003201c344fd$6510f290$44e4a8c0@Bukittinggi> In-Reply-To: <003201c344fd$6510f290$44e4a8c0@Bukittinggi> Content-Type: multipart/alternative; boundary="------------050706020803030202040305" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/83 X-Sequence-Number: 9424 This is a multi-part message in MIME format. --------------050706020803030202040305 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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: > Dear Admin, > > Same Problem with Mr.Sidar Lopez Cruz too,but I want to Migration my > data from microsoft Excel to Postgresql, there are any possible to > Migration..??? > > best regard, > > -devi munandar > > ----- Original Message ----- > *From:* Sidar Lopez Cruz > *To:* pgsql-admin@postgresql.org > *Sent:* Tuesday, July 08, 2003 12:44 AM > *Subject:* [ADMIN] exporting data > > which is the best tool for exporting data from mssql to postgresql > i try with pgAdmin II, but it's slow > > i try directly by odbc from mssql but don't work > > > > :-) Sidar Lopez Cruz > - Cero Riesgo, S.A. > --------------050706020803030202040305 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit 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:
Dear Admin,
 
Same Problem with Mr.Sidar Lopez Cruz too,but I want to Migration my data from microsoft Excel to Postgresql, there are any possible to Migration..???
 
best regard,
 
-devi munandar
----- Original Message -----
Sent: Tuesday, July 08, 2003 12:44 AM
Subject: [ADMIN] exporting data

which is the best tool for exporting data from mssql to postgresql
i try with pgAdmin II, but it's slow
 
i try directly by odbc from mssql but don't work
 
 

:-) Sidar Lopez Cruz
- Cero Riesgo, S.A.

--------------050706020803030202040305--