From: | Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl> |
---|---|
To: | Sim Zacks <sim(at)compulab(dot)co(dot)il> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Read MS-SQL data into Postgres via ODBC link? |
Date: | 2011-07-05 16:28:51 |
Message-ID: | 01BC47E6-6B7E-4A57-A7DF-5D2EA3116802@solfertje.student.utwente.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Guys, the OP isn't using MySQL, but MS-SQL.
Not that your solutions don't apply in that case, but it's just a little sloppy to be talking about the wrong database all the time ;)
On 5 Jul 2011, at 9:37, Sim Zacks wrote:
> I've done similar things with a plpythonu function.
>
> Basically, import the mysql module, call your select statement and then for each row do a plpy.execute(insert stmt)
>
>
> Sim
>
>
> On 07/05/2011 12:10 AM, Jonathan Brinkman wrote:
>
>> Greetings
>>
>> I'd like to INSERT data into my Postgresql 8.4.8 table directly from an
>> ODBC-linked MS-SQL table or view.
>>
>> I'm looking at using the Cybertec tool "ODBC-LINK"
>> (http://www.cybertec.at/en/postgresql_products/odbc-link) but I'm wondering
>> if there isn't a way to do this through Postgresql directly?
>>
>> I saw a post about someone doing a "SELECT * FROM XXX ODBC SOURCE" or
>> something like that
>> (http://archives.postgresql.org/pgsql-odbc/2009-07/msg00032.php) and that
>> would be cool. I don't need to import massive datasets, only 20-30K records
>> at a time.
>>
>> Thanks much
>>
>> Jonathan
>>
>>
>>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.
!DSPAM:737,4e133bd412094272933627!
From | Date | Subject | |
---|---|---|---|
Next Message | Alban Hertroys | 2011-07-05 16:49:51 | Re: Finding latest record for a number of groups in an INSERT-only table |
Previous Message | Tom Lane | 2011-07-05 16:25:57 | Re: Select count(*) /*from*/ table |