From: Yamil Suarez <yamil@yamil.com>
Date: Thu, 8 May 2014 21:37:07 +0000 (-0400)
Subject: Documentation: add a 'where' clause to bib record import stored procedure
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c04958b12b5ea91c68a41b891d1443fd868c9400;p=evergreen%2Fmasslnc.git

Documentation: add a 'where' clause to bib record import stored procedure

The stored procedure for doing bib record import was lacking a 'where'
clause in one of the update statements.

Signed-off-by: Yamil Suarez <yamil@yamil.com>
---

diff --git a/docs/admin_initial_setup/migrating_your_data.txt b/docs/admin_initial_setup/migrating_your_data.txt
index da466ba6d4..e65af47b9d 100644
--- a/docs/admin_initial_setup/migrating_your_data.txt
+++ b/docs/admin_initial_setup/migrating_your_data.txt
@@ -100,7 +100,8 @@ DECLARE stage RECORD;
 BEGIN
 FOR stage IN SELECT * FROM staging_records_import ORDER BY id LOOP
       INSERT INTO biblio.record_entry (marc, last_xact_id) VALUES (stage.marc, 'IMPORT');
-      UPDATE staging_records_import SET dest = currval('biblio.record_entry_id_seq');
+      UPDATE staging_records_import SET dest = currval('biblio.record_entry_id_seq') 
+       WHERE id = stage.id;
    END LOOP;
   END;
   $$ LANGUAGE plpgsql;