ICON
Help Center / Webservice Delete /

Webservice Delete

Introduction

The delete data request can be used to delete data from one of the datasets available in your Spotzi Account. You can delete single records at a time, as well as entire datasets as a whole. Delete data requests can be executed by adding a DELETE request to the "q" parameter.

DELETE FROM dataset_name
WHERE id = 12

The above statement is divided into:

Dataset list

The first section of the select query:

DELETE FROM dataset_name

States which dataset is targeted by the delete statement.

Note that if no fields are specifically targeted then the entire dataset will be deleted. Please use an UPDATE query if you'd only like to empty specific dataset fields.

Optional Qualification

The last — and optional — section of the query.

WHERE type = 'A'

This specifies which rows are to be deleted; all rows meeting the WHERE statement requirements will be deleted.

Examples

Below you will find some example queries that can be used with the Spotzi Webservice. The dataset names and fields used in these examples must be available in the requested webservice account to show a valid result.

DELETE FROM neighbourhood

The above statement deletes all records of the table "neighbourhood". After execution of the query this table will still exist; it will, however, be empty.

DELETE FROM neighbourhood
WHERE type = 'urban'

The above statement deletes all neighbourhood dataset records where type = "urban"

For more information about SQL DELETE statements, please consult the SQL section in our help center or see the official PostgreSQL tutorial.

Related blog posts

Gain Instant Access to a World of Maps

Spotzi Explorer is an integrated data catalog that lets you quickly and easily add data to your dashboards. Access a rich collection of maps and dashboards—explore postal codes, discover global income insights, or get inspired by maps created by our community. It’s the ideal tool for marketers, researchers, students, and anyone looking to enhance their market research, plan an OOH campaign, or work with location data.

Postal Codes Map
Create your free account Browse Datasets

Ready to turn your data into insights?

Spotzi's platform streamlines the process of geomarketing research & analysis by providing you with a one-stop-shop for all of your mapping and location data needs.

Are you ready to take your campaigns to the next level? Contact us to learn more about our plans.

Contact us

Contact

Spotzi North America
  • 125-720 King Street West
  • Toronto ON M5V 3S5
  • Canada
Spotzi Europe
  • Joulehof 9
  • 4622 RG Bergen op Zoom
  • The Netherlands