Hi,
Is it possible to write an insert query like below in Postgres?
<br />
Insert into test (col,col2) (SELECT user_id from expertmaintain where ST_Dwithin(ST_MakePoint(80.82, 7.8),ST_MakePoint(added_lng, added_lat), 0.2),'abc');
I'm getting below error on this case.
ERROR: syntax error at or near ","<br />
LINE 2: ...80.82, 7.8),ST_MakePoint(added_lng, added_lat), 0.2),'abc');
^
********** Error **********
ERROR: syntax error at or near ","<br />
SQL state: 42601
Note: (SELECT user_id from expertmaintain where ST_Dwithin(ST_MakePoint(80.82, 7.8),ST_MakePoint(added_lng, added_lat)) this returns a text