by StackTrace » Wed Jul 28, 2010 11:01 am
I manually insert notes for players based upon there rating (after deleting these first):
insert into notes(id_note,id_x,enum_type,date_note,notes)
select
nextval('notes_sequence') --(equivalent to max(id_note)+1)
,p.id_player
,'P'
,now()
,case p.val_icon
when 1 then 'Fish LP/P'
when 2 then 'Moneybag TA/A'
when 3 then 'Happy SLA/A'
when 4 then 'Sad SLA/P'
when 5 then 'Warning TA/P'
when 6 then 'Bomb SLP/A'
when 7 then 'Dice LA/P'
when 8 then 'Rock TP/A'
when 9 then 'Tornado LA/A'
when 10 then 'Question'
when 11 then 'Phone SLP/P'
when 12 then 'Mouse TP/P'
when 13 then 'Elephant LP/A'
when 14 then 'Eagle TA'
end as x
from
player p
where p.val_icon > 0
and now I am unsure if I do this correct: what to put in id_note and id_x.
In the data-schema documentation (3.00 Build 4) I can find the following:
id_note, integer, Note identifier. This id matches the ID number of whatever this note is of. For instance, if this is a note about a specific player, then the id_note value is equal to the id_player value. If this note is about a certain session, then the id
is equal to the value of id_session.
id_x, integer, Identifier dependent on enum_type.
This could explain the problem deleting/updating these notes from within Pokertracker.