Re: Query regarding Bulk Import

From: "James Prichard" <james(dot)prichard(at)markit(dot)com>
To: <pgadmin-support(at)postgresql(dot)org>
Cc: "Dheeman - Web Spiders India" <dheeman(dot)dutta(at)webspiders(dot)com>
Subject: Re: Query regarding Bulk Import
Date: 2005-04-18 15:17:06
Message-ID: A8D8891C40113445A567195896DC83AE8DFFB1@exch_svr.Dadd.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support


The Postgres equivalent of the Microsoft command

Microsoft T-SQL
===============
BULK INSERT 'database_name.owner.table_name'
FROM 'data_file'
WITH (FIRSTROW=2)

I like to store the column header names in row 1

Postgres
========
COPY tablename [ ( column [, ...] ) ]
FROM 'filename'

Both of these work with tab delimited text flat files.

Dropping indices and avoiding locking and logging overheads is very
important to getting data in fast for Microsoft SQL Server, and
presumably Postgres.

I've not looked at DTS for dumping text from Microsoft. For my smaller
database, an ADODB SELECT query and writing the record set to a text
file was quick enough.

-----Original Message-----

I'd use DTS

Thank You
Sim Zacks

-----Original Message-----
Hi,

I'm a new user of postgres. Earlier my database was sqlserver . now i
want
to perform BULK IMPORT of data from Sqlserver to Postgres. Can you
please
suggest what are the tools that might be used in this purpose. Just to
note
that the data size in Sqlserver is of size more than 10GB.

Thanks & Regards,

Dheeman Dutta

Browse pgadmin-support by date

  From Date Subject
Next Message juanmime 2005-04-18 15:31:55 Create oid inside triggers in C
Previous Message Sim Zacks 2005-04-18 13:49:42 Re: Query regarding Bulk Import