Wednesday, April 16, 2008

HRMS - fnd_session tip

Almost all the HRMS views have a join to fnd_sessions table. When user changes their date-track value, it gets reflected in fnd_sessions table. Use the SQL below to create a default record for your SQL*Plus session;

INSERT INTO fnd_sessions
(session_id
,effective_date)
(SELECT userenv('sessionid')
,SYSDATE
FROM dual
WHERE NOT EXISTS (SELECT 'c'
FROM fnd_sessions s1
WHERE userenv('sessionid') = s1.session_id));

0 comments: