Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

236
Vistas
How to find the latitude value and save it in another table in postgresql

I have a shp file, I want to get the latitude value and store it in an another table.

CREATE TABLE Polepoints ( X varchar(50),Y varchar(50),Z  varchar(50));

Insert action :

INSERT INTO Polepoints (X) Select ST_X (ST_Centroid(geos)) from mytable

It throws out error

column X doesn't exist

but the column and the table exists. I am a beginner.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The problem has to be somewhere else. If the Polepoints table actually has a column named X , this error should not appear (see example below). Check if you are connected to the correct database or even if the polepoints in the polepoints table (the one containing column X ) is in a different schema.

 CREATE TABLE Polepoints ( X varchar(50),Y varchar(50),Z varchar(50)); WITH mytable (geos) AS ( VALUES ('POINT(1 1)'),('POINT(2 3)') ) INSERT INTO Polepoints (X) SELECT ST_X (ST_Centroid(geos)) FROM mytable; SELECT * FROM polepoints; x | y | z ---+---+--- 1 | | 2 | |
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda