Gamepedia - column search/replace data

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
evg2000
Bruji Friend
Bruji Friend
Posts: 16
Joined: Thu Dec 20, 2007 3:17 pm

Gamepedia - column search/replace data

Post by evg2000 »

I imported my video game collection from a CVS file I created from my previous self developed VG software (from a PC). One of the columns now has a " in ever field, doesn't matter if the field has data or not. I checked my input file, and it's in the proper format. I want to be able to do a search/replace for " in the column, I doesn't see anything like that available. Searching the forum I noticed similar questions and they were told to update the xml database, but I think that was for a previous version as I don't see an xml database. So what options do I have to correct the data in the column, all other columns are fine.

thanks,
Charles
http://www.evg2000.com
User avatar
Conor
Top Dog
Posts: 5344
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

The new database format is SQL. So it's a bit more complicated than a simple find and replace with a text editor. Quit DVDpedia and make a copy of Database.pediadata (in ~/Library/Application Support/DVDpedia) before you start, as backup. Then in the program Terminal type:

Code: Select all

sqlite3 ~/Library/Application\ Support/DVDpedia/Database.pediadata
You will now have prompt that says sqlite> you can now send any SQL statement to view and modify the database. In your case what you would be interested in is something along the lines of:

Code: Select all

update ZENTRY Set ZNameOfField = replace(ZNameOfField, '"', '');
To close the file do:

Code: Select all

.exit
This was copied from a previous post that has more information. If that seems daunting feel free to send us the file and will clean it up for you.
evg2000
Bruji Friend
Bruji Friend
Posts: 16
Joined: Thu Dec 20, 2007 3:17 pm

Post by evg2000 »

Thanks for the quick response, didn't work on my machine with Tiger, but I tried it on my machine with Leopard and it worked. I have an older version of sqlite on the Tiger machine.

charles
http://www.evg2000.com
User avatar
Conor
Top Dog
Posts: 5344
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

The older version of sqlite3 on Tiger does not support the replace command; there is a post (search for sqlite3) about how to update sqlite3 on Tiger by installing the developer tools on the Tiger CD, but using Leopard also works.
Post Reply