I want to insert GEOMETRY values into a table. For which I have a table with three columns as shown below:
Table: geo
create table geo
(
p1 float,
p2 float,
Paths GEOMETRY
);
Input values: I have following values
p1 = 22.9901232886963
p2 = 87.5953903123242
INSERT INTO geo(Paths)
VALUES (geometry::STGeomFromText('POLYGON (22.9901232886963,87.5953903123242)', 4326));
Your WKT is malformed. This works for me:
declare @g geometry = geometry::STGeomFromText(
'POINT (22.9901232886963 87.5953903123242)'
, 4326);
select @g
Note too that it's a point and not a polygon.