[Koha] copying databases?

Chris Cormack chris at katipo.co.nz
Mon Nov 25 09:48:24 NZDT 2002


On Fri, Nov 22, 2002 at 11:00:20AM +0700, David Bucknell said:
> Dear Koha Kurus,
> 
> I have discovered that _something_ went wrong with the original school we set up
> and so have added a "branch." The old one didn't accept data correctly; the new
> one does. Assuming the data was input correctly (I know that's a question), is
> there a way to export the data we've input from the original to the new branch?
> 
Kia Ora David

So what you are asking is you have a whole lot of items in the database that
have their homebranch and/or current branch set to the old broken branch.
And you want to move them all to the new one?

If im reading you right, you should be able to do this with one or two sql
statements.

UPDATE items SET homebranch='newbranchcode' WHERE homebranch='oldbranchcode';
UPDATE items SET holidingbranch='newbranchcode' WHERE
holdingbranch='oldbranchcode';

Of course it goes without saying, always back up your database before
running any big update/deletes etc.

I hope this is some help, If I have misunderstood your question please let
me know.

Chris

-- 
Chris Cormack                                                     Programmer
025 500 789                                        Katipo Communications Ltd
chris at katipo.co.nz                                          www.katipo.co.nz



More information about the Koha mailing list