[postgis-users] Insert [off-topic]

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Thu Mar 23 06:12:13 PST 2006


> From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Ezequias
Rodrigues da Rocha
> Sent: 23 March 2006 13:01
> To: PostGIS Users Discussion
>Subject: [postgis-users] Insert [off-topic]

(cut)

> I am trying to add a table inside of another using this command line:
>
> dbpotgis=# INSERT INTO imoveis select * from imoveis3;
> ERROR:  value too long for type character varying(2)
>
> But as you can see there is a small message that don't tell anything about
the problem.


Hi Ezequias,

The message is telling you that you're trying to put a string longer than 2
characters into a varchar(2) column. The most likely cause is that you
aren't specifying the column list manually and the column order is different
between the two tables. You should be able to solve this by manually
specifying the order of your columns, for example:

	INSERT INTO imoveis (col1, col2... col3) SELECT col1, col2... col3
FROM imoveis3;


Kind regards,

Mark.

------------------------
WebBased Ltd
17 Research Way
Plymouth
PL6 8BT

T: +44 (0)1752 797131
F: +44 (0)1752 791023

http://www.webbased.co.uk  
http://www.infomapper.com
http://www.swtc.co.uk 

This email and any attachments are confidential to the intended recipient
and may also be privileged. If you are not the intended recipient please
delete it from your system and notify the sender. You should not copy it or
use it for any purpose nor disclose or distribute its contents to any other
person.





More information about the postgis-users mailing list