Update patron expiry date for selected patrons
- Article Type: General
- Product: Aleph
- Product Version: 18.01
Description:
We need a way to update the expiry date for a subset of our local patron records. Although I haven't been told the scope of the problem yet, the majority of patron records requiring adjustment have z303-title = 2010, z303-home-library = acfst, and z305-expiry-date = 04/30/07. I'm guessing we'll have to do an SQL find/replace operation to make this change. I need help correctly constructing the retrieval query and replacement operation.
This is for patrons with ALEPH patron status=09 only.
Resolution:
All of the type 09 z305's are in the fcl00 $usr_library; none in xxx50. So the update I have suggest below is for fcl00, not xxx50.
Make sure that these are what you want:
>s+ fcl00;
fcl00@ALEPH0> select count(*) from z305 where z305_bor_status = '09' and substr(z305_rec_key,1,12) in (select z303_rec_key from z303 where z303_home_library = 'ACFST' and z303_title = '2010');
To look at the patrons before changing them, instead of doing "select count(*) from z305 ...", do "select z305_rec_key from z305 ...". This will give you a list of patron record keys you can look at.
2. Run p_file_03 to back up the FCL00 Z305 table.
3. Use this SQL to do the update:
>s+ fcl00;
fcl00@ALEPH0> update z305 set z305_expiry_date = '20070430' where z305_bor_status = '09' and substr(z305_rec_key,1,12) in (select z303_rec_key from z303 where z303_home_library = 'ACFST' and z303_title = '2010');
- Article last edited: 10/8/2013