Here ya go.
This joins the occupancy table and the filespaces table to give me a list of the filespaces that haven't been backed up in over 60 days, and the SIZE they occupy on the server in my pool named BAKUPTAPE. the "oc" and "fs" are made up shorthand tags that let you distinguish between the column in one table and the column of the same name in a different table. Not intuitively obvious. Good to make friends with your local DBA, they know how to do this (I married mine, but that solution is probably too extreme for most people ;>) select current_date,oc.node_name, oc.filespace_name, physical_mb as mbytes , stgpool_name, - date(fs.backup_start) as bkup_date from occupancy oc, filespaces fs - where oc.node_name=fs.node_name and - oc.filespace_name=fs.filespace_name and - stgpool_name='BACKUPTAPE' and - cast((current_timestamp-backup_start)days as integer)>=60 - order by stgpool_name, oc.node_name, oc.filespace_name -----Original Message----- From: Justin Bleistein [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 30, 2003 12:44 PM To: [EMAIL PROTECTED] Subject: tsm select statement help Does anyone have an sql syntax/statement example on how to join two sql tables in adsm/tsm? I have two tables in that adsm schema which both contain info that the other doesn't respectively. So I want to join them to get the desired results. I'm looking at Oracle examples on the web none really good. Any assistance would be appreciated. I know I could figure it out but if someone could save me trial and error time. I would really appreciate it.. Thanks in advance. --Justin Richard Bleistein Unix/TSM Systems Administrator