Project

General

Profile

« Previous | Next » 

Revision 1182

inputs/SALVIAS/verify.sql: Use new :datasource variable instead of literal 'SALVIAS'

View differences:

verify.sql
2 2
SELECT count(*) AS count
3 3
FROM project
4 4
JOIN party ON party_id = datasource_id
5
WHERE organizationname = 'SALVIAS'
5
WHERE organizationname = :datasource
6 6
;
7 7

  
8 8
SELECT 'projects' AS ___;
9 9
SELECT projectname AS project
10 10
FROM project
11 11
JOIN party ON party_id = datasource_id
12
WHERE organizationname = 'SALVIAS'
12
WHERE organizationname = :datasource
13 13
ORDER BY project
14 14
;
15 15

  
......
18 18
FROM project
19 19
JOIN party ON party_id = datasource_id
20 20
JOIN locationevent USING (project_id)
21
WHERE organizationname = 'SALVIAS'
21
WHERE organizationname = :datasource
22 22
GROUP BY project
23 23
ORDER BY project
24 24
;
......
27 27
SELECT count(DISTINCT location_id) AS count
28 28
FROM locationevent
29 29
JOIN party ON party_id = datasource_id
30
WHERE organizationname = 'SALVIAS'
30
WHERE organizationname = :datasource
31 31
AND parent_id IS NULL -- no subplots
32 32
;
33 33

  
......
35 35
SELECT count(*) AS count
36 36
FROM locationevent
37 37
JOIN party ON party_id = datasource_id
38
WHERE organizationname = 'SALVIAS'
38
WHERE organizationname = :datasource
39 39
AND parent_id IS NULL -- no subplots
40 40
;
41 41

  
......
47 47
JOIN party ON party_id = datasource_id
48 48
JOIN locationevent USING (project_id)
49 49
JOIN method USING (method_id)
50
WHERE organizationname = 'SALVIAS'
50
WHERE organizationname = :datasource
51 51
ORDER BY project, method
52 52
LIMIT 10;
53 53

  
......
59 59
JOIN party ON party_id = datasource_id
60 60
JOIN locationevent USING (project_id)
61 61
JOIN method USING (method_id)
62
WHERE organizationname = 'SALVIAS'
62
WHERE organizationname = :datasource
63 63
ORDER BY project, observationmeasure
64 64
LIMIT 10;

Also available in: Unified diff