rectifico: se os nulos sao campos em branco tens de por <b>with null as &#39;&#39;</b><br><br><br><div class="gmail_quote">2009/8/10 Eloi Ribeiro <span dir="ltr">&lt;<a href="mailto:eloi.ribeiro@gmail.com">eloi.ribeiro@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">podes usar o comando COPY [1].<br><br>exemplo:<br><br><b>copy tabela_destino from &#39;/home/user/ficheiro.csv&#39; using delimiters &#39;,&#39; with null as &#39;NULL&#39;;</b><br>
<br>se o delimitador for uma tabulação e os nulos igual a campos em branco, então podes fazer assim:<br>
<br><b>copy tabela_destino from &#39;/home/user/ficheiro.csv&#39;;<br><br></b>boa sorte.<b><br></b>xau,<br><br>[1] <a href="http://www.postgresql.org/docs/8.3/static/sql-copy.html" target="_blank">http://www.postgresql.org/docs/8.3/static/sql-copy.html</a><br>
<font color="#888888">
<br><br>-- <br>Eloi Ribeiro<br>GIS Analyst<br>39.45º -4.40º<br><a href="http://eloiribeiro.wordpress.com" target="_blank">http://eloiribeiro.wordpress.com</a><br><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Eloi Ribeiro<br>GIS Analyst<br>39.45º -4.40º<br><a href="http://eloiribeiro.wordpress.com">http://eloiribeiro.wordpress.com</a><br>