<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Perfect. Thank you very much.<br>
<br>
Sincerely<br>
Ezequias<br>
<br>
Robert Burgholzer escreveu:
<blockquote
 cite="midC9D51E2209AFD04F93E4E2E4CD6E4979016C3911@mail1.chesapeakebay.net"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City">
  <o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="Street">
  <o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="address"><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName">
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
  </style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  </o:SmartTagType></o:SmartTagType></o:SmartTagType></o:SmartTagType></o:SmartTagType>
  <div class="Section1">
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">When you do
a “select” instead
of a “values” statement for the values to insert, you shouldn’t
have the parentheses around the select column names. I.E>:<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">Insert into
tinytable (tinyid, tinyname)
select bigid, bigname from bigtable;<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">IS GOOD,
WHILE <o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">Insert into
tinytable (tinyid, tinyname)
select ( bigid, bigname ) from bigtable;<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">IS BAD.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">HTH,<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font color="navy" face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial; color: navy;">r.b.<o:p></o:p></span></font></p>
  <div>
  <div class="MsoNormal" style="text-align: center;" align="center"><font
 color="black" face="Times New Roman" size="3"><span
 style="font-size: 12pt; color: windowtext;">
  <hr tabindex="-1" align="center" size="2" width="100%"></span></font></div>
  <p class="MsoNormal"><b><font color="black" face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma; color: windowtext; font-weight: bold;">From:</span></font></b><font
 color="black" face="Tahoma" size="2"><span
 style="font-size: 10pt; font-family: Tahoma; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a>
[<a class="moz-txt-link-freetext" href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</a>] <b><span
 style="font-weight: bold;">On Behalf Of </span></b>Ezequias Rodrigues
da Rocha<br>
  <b><span style="font-weight: bold;">Sent:</span></b> Thursday, March
23, 2006
12:10 PM<br>
  <b><span style="font-weight: bold;">To:</span></b> <st1:PersonName
 w:st="on">PostGIS Users Discussion</st1:PersonName><br>
  <b><span style="font-weight: bold;">Subject:</span></b> Re:
[postgis-users]
Insert [off-topic]</span></font><font color="black"><span
 style="color: windowtext;"><o:p></o:p></span></font></p>
  </div>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;"><o:p> </o:p></span></font></p>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;">Mark,<br>
  <br>
I tryed what you recommended but I got another strange error again:<br>
  </span></font><font size="2"><span style="font-size: 10pt;"><br>
  <b><span style="font-weight: bold;">insert into</span></b> </span></font><font
 color="#009900" size="2"><span
 style="font-size: 10pt; color: rgb(0, 153, 0);">imoveis</span></font><font
 size="2"><span style="font-size: 10pt;">  (dsqf,
atividade,natureza,cod_lograd,num_imov,subunidade,num_bloco, bloco,
tipo_subun,
propriet, area_terre, area_total,area_unida,test_princ,
test_fict,patrimonio,
muro,calcada,pedologia,
topografia,formato,tip_estrut,tip_edif,acabamento,est_constr,pavimentac,geocodigo,inscricao,sequencial, 
planta, quadra, desc_impo,cod_impo,desc_limpe,cod_limpe,desc_ilumi,
cod_ilumi,pontos_vu, log_tipo,
log_titulo,log_prepos,nome_do_lo,razao,fantazia,cgc,desc_ativi,codbairro,nomebairro,
zona,zona_nome, preserva,coleta,dtcadastro,dthabit )  </span></font><font
 color="#009900" size="2"><span
 style="font-size: 10pt; color: rgb(0, 153, 0);">select</span></font><font
 size="2"><span style="font-size: 10pt;">
(dsqf,atividade,natureza,cod_lograd,num_imov,subunidade,num_bloco,
bloco,
tipo_subun, propriet, area_terre, area_total,area_unida,test_princ,
test_fict,patrimonio, muro,calcada,pedologia,
topografia,formato,tip_estrut,tip_edif,acabamento,est_constr,pavimentac,geocodigo,inscricao,sequencial, 
planta, quadra, desc_impo,cod_impo,desc_limpe,cod_limpe,desc_ilumi,
cod_ilumi,pontos_vu, log_tipo,
log_titulo,log_prepos,nome_do_lo,razao,fantazia,cgc,desc_ativi,codbairro,nomebairro,
zona,zona_nome, preserva,coleta,dtcadastro,dthabit ) </span></font><font
 color="#009900" size="2"><span
 style="font-size: 10pt; color: rgb(0, 153, 0);">from</span></font><font
 size="2"><span style="font-size: 10pt;"> </span></font><font
 color="#009900" size="2"><span
 style="font-size: 10pt; color: rgb(0, 153, 0);">imoveis3</span></font><font
 size="2"><span style="font-size: 10pt;">;<br>
  <br>
  </span></font><font color="#cc0000" size="2"><span
 style="font-size: 10pt; color: rgb(204, 0, 0);">ERROR:  column "dsqf"
is of type character
varying but expression is of type record<br>
HINT:  You will need to rewrite or cast the expression.</span></font><font
 size="2"><span style="font-size: 10pt;"><br>
dbpotgis=#<br>
  </span></font><br>
And now friend ?<br>
  <br>
  <br>
  <br>
Mark Cave-Ayland escreveu: <o:p></o:p></p>
  <blockquote style="margin-top: 5pt; margin-bottom: 5pt;" type="cite">
    <pre wrap=""><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">From: <a
 href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a><o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">    <o:p></o:p></span></font></pre>
  </blockquote>
  <pre wrap=""><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">[<a
 href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</a>] On Behalf Of Ezequias<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">Rodrigues da Rocha<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">  <o:p></o:p></span></font></pre>
  <blockquote style="margin-top: 5pt; margin-bottom: 5pt;" type="cite">
    <pre wrap=""><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">Sent: 23 March 2006 13:01<o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">To: <st1:PersonName w:st="on">PostGIS Users Discussion</st1:PersonName><o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">Subject: [postgis-users] Insert [off-topic]<o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">    <o:p></o:p></span></font></pre>
  </blockquote>
  <pre wrap=""><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">(cut)<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">  <o:p></o:p></span></font></pre>
  <blockquote style="margin-top: 5pt; margin-bottom: 5pt;" type="cite">
    <pre wrap=""><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">I am trying to add a table inside of another using this command line:<o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">dbpotgis=# INSERT INTO imoveis select * from imoveis3;<o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">ERROR:  value too long for type character varying(2)<o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">But as you can see there is a small message that don't tell anything about<o:p></o:p></span></font></pre>
    <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">    <o:p></o:p></span></font></pre>
  </blockquote>
  <pre wrap=""><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">the problem.<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">Hi Ezequias,<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">The message is telling you that you're trying to put a string longer than 2<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">characters into a varchar(2) column. The most likely cause is that you<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">aren't specifying the column list manually and the column order is different<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">between the two tables. You should be able to solve this by manually<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">specifying the order of your columns, for example:<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">        INSERT INTO imoveis (col1, col2... col3) SELECT col1, col2... col3<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">FROM imoveis3;<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">Kind regards,<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">Mark.<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">------------------------<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">WebBased Ltd<o:p></o:p></span></font></pre>
  <pre><st1:Street w:st="on"><st1:address w:st="on"><font color="black"
 face="Courier New" size="2"><span style="font-size: 10pt;">17 Research Way</span></font></st1:address></st1:Street><o:p></o:p></pre>
  <pre><st1:City w:st="on"><st1:place w:st="on"><font color="black"
 face="Courier New" size="2"><span style="font-size: 10pt;">Plymouth</span></font></st1:place></st1:City><o:p></o:p></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">PL6 8BT<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">T: +44 (0)1752 797131<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">F: +44 (0)1752 791023<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><a href="http://www.webbased.co.uk">http://www.webbased.co.uk</a>  <o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><a href="http://www.infomapper.com">http://www.infomapper.com</a><o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><a href="http://www.swtc.co.uk">http://www.swtc.co.uk</a> <o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">This email and any attachments are confidential to the intended recipient<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">and may also be privileged. If you are not the intended recipient please<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">delete it from your system and notify the sender. You should not copy it or<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">use it for any purpose nor disclose or distribute its contents to any other<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">person.<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">_______________________________________________<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">postgis-users mailing list<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><a
 href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><a
 href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><o:p> </o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">  <o:p></o:p></span></font></pre>
  <p class="MsoNormal"><font color="black" face="Times New Roman"
 size="3"><span style="font-size: 12pt;"><br>
  <br>
  <o:p></o:p></span></font></p>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">-- <o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">Ezequias Rodrigues da Rocha<o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><a href="http://ezequiasrocha.blogspot.com">http://ezequiasrocha.blogspot.com</a><o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;"><a href="mailto:msn:ezequias@hotmail.com">msn:ezequias@hotmail.com</a><o:p></o:p></span></font></pre>
  <pre><font color="black" face="Courier New" size="2"><span
 style="font-size: 10pt;">"the worst of democracies is still better than the best of dictatorship"<o:p></o:p></span></font></pre>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Ezequias Rodrigues da Rocha
<a class="moz-txt-link-freetext" href="http://ezequiasrocha.blogspot.com">http://ezequiasrocha.blogspot.com</a>
<a class="moz-txt-link-abbreviated" href="mailto:msn:ezequias@hotmail.com">msn:ezequias@hotmail.com</a>
"the worst of democracies is still better than the best of dictatorship"
</pre>
</body>
</html>