on 10-31-2015 11:06 AM
Hi All,
I am trying to use geo spatial method ST_POINT in my sql script when trying to insert data in geo spatial field i am getting below error:
"Could not execute 'INSERT INTO "NEO_B45RWNY007IMPIDRM4ZSG1OV0"."COMPLOC" VALUES('CHEN01','CHENNAI','TAMILNADU',new ...'
SAP DBTech JDBC: [270]: not enough values: ST_POINT('POINT(13.0878400 80.2784700)'): line 1 col 93 (at pos 92)"
Below is my table which i created with geo spatial data type:
create column table "NEO_B45RWNY007IMPIDRM4ZSG1OV0"."COMPLOC"(COMPID BIGINT PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,CITYID VARCHAR(6),CITY VARCHAR(30),STATE VARCHAR(30),
LONGLAT ST_GEOMETRY(4326));
Below is my insert statement in which am getting error:
INSERT INTO "NEO_B45RWNY007IMPIDRM4ZSG1OV0"."COMPLOC" VALUES('CHEN01','CHENNAI','TAMILNADU',new ST_POINT('POINT(13.0878400 80.2784700)'));
I am following exact syntax which was posted about this topic in other post's. Am i missing any parameter in ST_POINT. Please help me in resolving this issue.
Thanks,
Rithika
You're leaving out the automatically generated COMPID column but you don't specify a column list with your INSERT statement.
That's a bug in your code.
Use INSERT INTO COMPLOC (CITYID, CITY, STATE, LONGLAT) VALUES (.... ) instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.