Backendless Support
 
Solved

Delete not related GEO Points

I have a relation from DATA Table to geo point. Now I want to remove all odd geo points without relation from data table? How can I do it from the backendless web console?

I need to run SQL like this:

  1. DELETE FROM GeoCategory WHERE id NOT IN (
  2. SELECT t.id
  3. FROM (
  4. SELECT d.id
  5. FROM mydata d
  6. LEFT JOIN GeoCategory geo ON geo.id = d.geo
  7. ) as t
  8. );

Thank you.

Leave a Comment

Comments (4)

photo
1

Hi Martin,

This is the where clause to find those geo points:

  1. YourDataTable[relationColumnName].objectId IS NULL

(reference: https://backendless.com/docs/rest/doc.html#data_inverted_relation_retrieval)

You may delete them from console or from your code using API.

photo
1

Hello Segey,

unfortunately your suggested solution could be used to delete DataTable items. But I need to remove GeoPoint items.

photo
1

You can search geo points using where clause, too.

photo
1

Thank you Sergey, I did not know that. So here is a documentation how to operate over geo point.

photo