From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Tim Uckun <timuckun(at)gmail(dot)com>, S McGraw <smcg4191(at)mtneva(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Importing directly from BCP files |
Date: | 2015-11-16 19:34:39 |
Message-ID: | 564A2FCF.70708@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 11/16/2015 11:13 AM, Tim Uckun wrote:
> I don't see any documentation anywhere about the BCP format and as I
> said googling for "BCP format" gives a zillion links about the format
> files. Every project on github just calls out the BCP command but I am
> on linux and that doesn't help me at all.
>
> Bummer. This is going to be a huge pain to try and import these files.
On openSuSE 13.2
sudo zypper install freetds-tools
Ubuntu 14.04
sudo apt-get install freetds-bin
aklaver(at)killi:~> freebcp -h
usage: freebcp [[database_name.]owner.]table_name {in | out} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n] [-c] [-t field_terminator] [-r row_terminator]
[-U username] [-P password] [-I interfaces_file] [-S server]
[-v] [-d] [-h "hint [,...]" [-O "set connection_option on|off,
...]"
[-A packet size] [-T text or image size] [-E]
[-i input_file] [-o output_file]
example: freebcp testdb.dbo.inserttest in inserttest.txt -S mssql -U
guest -P password -c
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2015-11-16 19:37:22 | Re: Importing directly from BCP files |
Previous Message | Tim Uckun | 2015-11-16 19:13:04 | Re: Importing directly from BCP files |