Tag Archives: SQL

Find and select duplicate values in your vector attribute table

Suppose you have a vector layer in your GRASS GIS database and you want to find all duplicate values in one of the columns of the attribute table of that layer?

If you are using SQLite or PostgreSQL as the database back-end (and you should), this is easy using a SQLite statement. Suppose you have the table sp1th and the column value with duplicate values: Continue reading

Finding and removing carriage returns in your SQLite table

The problem with copy data from e.g., an excel or calc sheet into an SQLite database (or any database I reckon) is that the data you copy might include an carriage return. I found this out the hard way after having copied data from a spreadsheet into a attribute table of a GRASS GIS vector layer (which is stored in a SQLite database). Continue reading