Обсуждение: Import/export CSV files to postgres

Поиск
Список
Период
Сортировка

Import/export CSV files to postgres

От
"Nathalie Boulos"
Дата:
Hi,

i'm importing and exporting CSV files to fill in tables on postgres 7.3.2
via PHP-4.2.2 (web interface)
The database uses UTF-8 encoding and MS-office uses ISO-8859-1.

When i import a CSV file to the DB, I execute the "recode" command to do the
ISO>UTF-8 conversion, after uploading it. Then the CSV is successfully
inserted in the DB.

The problem is on the export level:
the PHP script writes a CSV file to the disk. This file is UTF-8. It cannot
be read properly in excel. "Recode" in the oposite way (UTF-8>ISO) is
useless.

Does anyone know what I should do to be able to see the exported CSV in
MS-Excel correctly??

I would greatly  appreciate any suggestion.

Thanks in advance.
Regards
Nathalie




_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


Outer Join

От
Andrés Repossi
Дата:
Hi,

I'm trying to make an OUTER JOIN using POSTGRESQL, but I don't know how the
syntax is.

Where can I find information or if anyone could just tell me.

I would greatly  appreciate any suggestion.

Thanks in advance.
Regards

Andrés




_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly


Re: Outer Join

От
Andrew Biagioni
Дата:
All the docs. are in:
    http://www.postgresql.org/docs/

If you select "Interactive Documentation" you can do searches
(recommended for your specific question), otherwise you can go to
"Static Documentation" and look up the syntactic details of "SELECT".

Andrés Repossi wrote:

>Hi,
>
>I'm trying to make an OUTER JOIN using POSTGRESQL, but I don't know how the
>syntax is.
>
>Where can I find information or if anyone could just tell me.
>
>I would greatly  appreciate any suggestion.
>
>Thanks in advance.
>Regards
>
>Andrés
>
>
>
>
>_________________________________________________________________
>Add photos to your messages with MSN 8. Get 2 months FREE*.
>http://join.msn.com/?page=features/featuredemail
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>
>
>


Re: Import/export CSV files to postgres

От
"Nathalie Boulos"
Дата:
Hi,

well the answer to my question is quite easy. I'm posting it in case someone
needs it one day:

there's a function in PHP utf8_decode() that converts to ISO-8859-1. This
should be used and gives successful result.

Regards
Nat

>
>Hi,
>
>i'm importing and exporting CSV files to fill in tables on postgres 7.3.2
>via PHP-4.2.2 (web interface)
>The database uses UTF-8 encoding and MS-office uses ISO-8859-1.
>
>When i import a CSV file to the DB, I execute the "recode" command to do
>the ISO>UTF-8 conversion, after uploading it. Then the CSV is successfully
>inserted in the DB.
>
>The problem is on the export level:
>the PHP script writes a CSV file to the disk. This file is UTF-8. It cannot
>be read properly in excel. "Recode" in the oposite way (UTF-8>ISO) is
>useless.
>
>Does anyone know what I should do to be able to see the exported CSV in
>MS-Excel correctly??
>
>I would greatly  appreciate any suggestion.
>
>Thanks in advance.
>Regards
>Nathalie
>
>
>
>
>_________________________________________________________________
>Add photos to your messages with MSN 8. Get 2 months FREE*.
>http://join.msn.com/?page=features/featuredemail
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail