Skip to main content

Questions tagged [trigger]

in this context implies a SQL trigger, (aka database trigger), which is a type of stored procedure that is called automatically in response to a specified event in the database.

0 votes
1 answer
50 views

QGIS - SpatiaLite - SQLite string manipulations (position/replace)

I have two layers : Layer 1: ESPECES_HABITATS_ATTRIBUTS, with fields 'espece' (containing unique values) and 'distance' (an integer). Layer 2: ESPECES_HABITATS_POLY, with fields 'ESPECE' (a ...
Giene's user avatar
  • 753
1 vote
0 answers
29 views

QGIS - SQLite trigger to create buffer but with a non-overlaping clause

I'm using an SQLite trigger to add a buffer around another "POINT" layer based on entered values. The buffers are being correctly added, but I'm encountering difficulty in preventing them ...
Giene's user avatar
  • 753
1 vote
2 answers
87 views

QGIS - Synchronize polygons changes between layers

I'm working with two distinct SpatiaLite layers, each with specific fields (they are not duplicates of each other). While working on HABITATS_POLY, I aim to update ZONES_HUMIDES_POLY based on field ...
Giene's user avatar
  • 753
1 vote
0 answers
38 views

Field value populated ether by another field value or by user input based on a Boolean field in QGIS form

I'm creating a winter bird survey form in QGIS for use in Qfield. There is a field called "mixed" which records whether a flock is mixed(1) or not(0). Another field called "sp_count&...
P Dreyer's user avatar
  • 145
2 votes
1 answer
58 views

Backup table does not replicate geometry, fed by trigger in pgAdmin (postGIS)

I have two tables, A and B. B is a backup of A. Table A has a trigger: CREATE OR REPLACE TRIGGER trigger AFTER INSERT OR UPDATE OR DELETE ON A FOR EACH ROW EXECUTE FUNCTION ...
Tobias Holms's user avatar
0 votes
0 answers
38 views

QGIS - Unable to save after mergin attribute - (SpatiaLite - Triggers)

I'm working with SpatiaLite layers, and I'm currently encountering a problem when I use the tool: « Merge attributes of selected entities ». I use several triggers that are not the cause of the ...
Giene's user avatar
  • 753
2 votes
2 answers
99 views

QGIS - Trigger's execution too slow (QGIS freeze)

I am currently working on a SpatiaLite layer that is updated after insertions and modifications through triggers. When I copy-paste features on the "HABITATS_POLY" layer, it triggers updates ...
Giene's user avatar
  • 753
0 votes
1 answer
52 views

QGIS - SpatiaLite triggers doesn't update properly each field

See edit at the end of the post I am working in two layers: HABITATS_POLY (important fields: "EUNIS_1" , "EUNIS_2" , "EUNIS_3" , "EUNIS_4" ; "EUNIS22_1&...
Giene's user avatar
  • 753
1 vote
1 answer
52 views

QGIS - How to update several rows with triggers SQLite

I currently have two SpatiaLite layers: HABITATS_POLY: Key fields include EUNIS_1, EUNIS_2, EUNIS_3, EUNIS_4, EUNIS22_1, EUNIS22_2, EUNIS22_3, EUNIS22_4. GESTION_CODES: Key fields include EUNIS and ...
Giene's user avatar
  • 753
0 votes
0 answers
69 views

Triggers for multiple tables in Geopackage and DB Browser for SQLite for QGIS use

I need to build an automatic trigger in the database so that when inserting/updating a new polygon in the SETORES feature and filling in the CD_GEOCMU key attribute with the appropriate code, for ...
Denilson's user avatar
  • 695
0 votes
0 answers
66 views

QGIS how to improve triggers on SQL - SpatiaLite

I'm looking for a way to improve the way my triggers are working on a SpatiaLite layer. Currently, it takes 45 seconds to work on 1000 entities. Is there a way to improve the performance? My triggers ...
Giene's user avatar
  • 753
1 vote
0 answers
56 views

Refresh attribute table after SQL trigger

I'm utilizing a trigger on a SpatialLite layer in QGIS. This trigger is designed to update a field when its content matches with another in the database. Here's the trigger's code: CREATE TRIGGER ...
Giene's user avatar
  • 753
1 vote
1 answer
53 views

QGIS - SpatialLite - Trigger for code correspondences - Manage multiple results

I have a database containing correspondences between codes (e.g., A = 1 = 11 = H = M, etc.). I've made the first 100 rows of this data available for download. BDD Extract I would like a feature where, ...
Giene's user avatar
  • 753
1 vote
2 answers
102 views

Geopackage trigger doesn't work

I use this trigger on a geopackage table: CREATE TRIGGER upd_iae_surf AFTER UPDATE ON "IAE CRD Surf" BEGIN UPDATE "IAE CRD Surf" SET "taille" = ROUND(ST_Area(NEW.geom)/...
Etienne's user avatar
  • 557
3 votes
1 answer
131 views

Date management problem in a trigger with PostgreSQL [closed]

I created two tables on PostgreSQL. I would like to note in a layer a date and retrieve: the corresponding year in a variable, then reuse the year variable in various other attributes integrating ...
fcka's user avatar
  • 985

15 30 50 per page
1
2 3 4 5
7