Subversion Repositories DevTools

Rev

Rev 119 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 119 Rev 4557
Line 1... Line 1...
1
/* Package Action Log */
1
/* Package Action Log */
-
 
2
/* Stange query attempts to retain the order of the entries */
-
 
3
/* The date format is not strong enough to ensure correct ordering */
-
 
4
/* The user should have used a timestamp instead */
2
SELECT alog.action_datetime, 
5
select alog.action_datetime, 
3
	   usr.FULL_NAME,
6
	   usr.FULL_NAME,
4
       usr.USER_EMAIL, 
7
       usr.USER_EMAIL, 
5
       acttype.description as acttype, 
8
       acttype.description as acttype, 
6
       alog.description
9
       alog.description
-
 
10
       from (
7
  FROM ACTION_LOG alog, ACTION_TYPE acttype, USERS usr
11
        SELECT  rownum as rn, action_datetime, ACTTYPE_ID, USER_ID, description
-
 
12
        FROM ACTION_LOG 
8
 WHERE alog.PV_ID = :PV_ID
13
        WHERE PV_ID = :PV_ID
-
 
14
 ) alog
9
   AND alog.ACTTYPE_ID = acttype.ACTTYPE_ID 
15
   join USERS usr on alog.user_id = usr.user_id
10
   AND alog.USER_ID = usr.USER_ID
16
   join ACTION_TYPE acttype on alog.acttype_id = acttype.acttype_id
11
 ORDER BY ( alog.ACTION_DATETIME ) DESC  
17
order by alog.action_datetime DESC, alog.rn DESC