Hi,
My guess is that (a) this is fairly easy to do and (b) somewhere, this has been asked and answered, and I just couldn't find it.
Anyhow, I'd like to copy the contents of one column in CDPedia to another column. So, for every entry in the library, I'd like the 'Location' column to match the 'Artist' column. (After which, I'd change a bunch of the 'locations' manually, but the first step is the big batch copy.)
Is that possible?
Thanks, all.
Copy Column Data?
Re: Copy Column Data?
There are several threads about moving data from one field to another here on the forum (for example here) but this is the gist:
- Quit CDpedia and make a backup of your database file found in your Home folder under ~/Library/Application Support/CDpedia/Database.cdpd. If you're on Lion, it hides the Library folder by default so to go to your CDpedia data folder you have to use the Finder's 'Go' menu, hold down the Option key and the Library folder will appear.
- Then run the program Terminal found in Applications/Utilities and copy paste the following lines into the window, each followed by a 'return' from your keyboard.
(This will copy the artist field into the location field for each entry where the location field contains NO information. If there's already something in the location field for an entry it'll leave it as is.)
- Now restart CDpedia and the change will be complete and saved.
- Quit CDpedia and make a backup of your database file found in your Home folder under ~/Library/Application Support/CDpedia/Database.cdpd. If you're on Lion, it hides the Library folder by default so to go to your CDpedia data folder you have to use the Finder's 'Go' menu, hold down the Option key and the Library folder will appear.
- Then run the program Terminal found in Applications/Utilities and copy paste the following lines into the window, each followed by a 'return' from your keyboard.
Code: Select all
sqlite3 ~/Library/Application\ Support/CDpedia/Database.cdpd
update zEntry set zlocation = zartist where zlocation is null;
.exit
- Now restart CDpedia and the change will be complete and saved.