Table Functions

mike ervin

Table Functions
In version 8 LUW, new snapshot table functions are avaliable for use. I am
trying to join two of them and return locks_held based on a user PID I type
in. This however does not work, any ideas from anyone would be appreciated,
thanks

select b.locks_held from
(
select t.agent_id from
table (snapshot_agent('' , -1))
where t.agent_pid = 12345
as t
)
join
(
select a.agent_id, a.lock_held from
table (snapshot_appl('',-1)) as a
on t.agent_id = a.agent_id
) b

---------------------------------------------------------------------------------
Welcome to the DB2 User Group - Central Pennsylvania list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/DB2-UG-Central-PA.html. From that page select "Join or Leave the list". The IDUG Listserv FAQ is at http://www.idugdb2-l.org. The DB2 User Group - Central PA List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm