Has anybody ever managed to load and display a SpatiaLite/SQLite layer
into QGIS when the source is a VIEW instead of a TABLE?
Yours
-S.
P.S. Here what I did:
-- Given the following famous Towns table from the SpatiaLite tutorial:
CREATE TABLE Towns (
PK_UID INTEGER PRIMARY KEY AUTOINCREMENT,
Name TEXT,
Peoples INTEGER,
LocalCounc INTEGER,
County INTEGER,
Region INTEGER, "Geometry" POINT
)
SELECT * from towns;
-- let's create a view...
-- containing at least a PK (of type integer) and a geometry
-- as well as a calculated column
CREATE VIEW IF NOT EXISTS towns_test_v AS
SELECT PK_UID, Name, Peoples + 1, Geometry from towns;
SELECT * FROM towns_test_v;
--
You received this message because you are subscribed to the Google Groups "SpatiaLite Users" group.
To post to this group, send email to
spatiali...@googlegroups.com.
To unsubscribe from this group, send email to
spatialite-use...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/spatialite-users?hl=en.