posted 17 years ago
Hello,
I have the following question about sql and ejb-ql:
My boss forces me to use a flat table as above. Here is what happened to this table:
1. A user inserted a record (key and pk == 1)
2. They then updated the same record. You will notice that the "key" is the same (pk == 2)
3. They then updated the update. Key is the same and pk ==3
4. They then inserted a fresh record (pk ==4)
5. Fresh insert again
6. Fresh insert again
7. Delete of immediately previous fresh insert
You will notice that for each action I have an insert into the db (this is for logging/history purposes).
I need to be able to retrieve all record that would have survived the updates and deletes through sql i.e. those marked by a star.
What would be the sql and the ejb-ql for that?
Any clue welcome,
Thanks in advance,
Julien Martin.