PDA

View Full Version : how to extract notes from DB table?



vlsup
02-24-2010, 04:28 PM
1) User has trial HEM but 15 days expired
2) user has another comp and installs HEM there
3) but no access via network (or smth) to the first one
4) so he can't set Postgres to connect to old DB anyway
5) user wants notes only from this old DB - no stats, no winnings. But because of trial end he can't start HEM and export notes via menu. HHs are in archive - no problem to import in a new DB.
6) We know - notes are stored in a DB table "hemplayernotes" (4 fields: note_id - player_id - note - icon_id)
and is possible to SQL-search playername (from another DB table) using player_id

Q: How to extract notes from old DB and put them in a new one?
It must be simple set of SQL queries...
DB_old --- csv-file --- DB_new

Tell me it's text, pls

fozzy71
02-24-2010, 11:34 PM
If he bought a license for HM on the 2nd PC he can just use his code on the first PC, export the notes, and then reset the license code on our registration site.

vlsup
02-25-2010, 05:29 AM
a) As I mentioned in first post, trial only
b) my question was about SQL queries, not licensing

Patvs
02-25-2010, 07:57 AM
You can't only export the notes table.
Since you only want the NOTES. Backup the entire database in pgadminIII on the old computer.

Restore the .backup file on the other computer. Connect to that database... only to export the NOTES. Either continue using that database, or delete the database, and import the notes into a new database.