Project

General

Profile

« Previous | Next » 

Revision 6949

semicolons!

View differences:

upgrade-db-to-2.0.0-postgres.sql
129 129
INSERT INTO max_identifier (docid, rev, guid)
130 130
SELECT docid, MAX(rev), docid || '.' || MAX(rev)
131 131
FROM identifier
132
GROUP BY docid
132
GROUP BY docid;
133 133

  
134 134
/** only need to join on docid since there is a single row for the max docid **/
135 135
UPDATE xml_access
136 136
SET accessfileid = maxid.guid
137 137
FROM max_identifier maxid, xml_access xa
138 138
WHERE xa.accessfileid = maxid.docid
139
AND xa.guid IS NOT null
139
AND xa.guid IS NOT null;
140 140

  
141 141
DROP TABLE max_identifier;
142 142

  

Also available in: Unified diff