ADSM-L

Equivalent of UNIX "tail/head" in TSM SQL query

2004-10-13 04:57:16
Subject: Equivalent of UNIX "tail/head" in TSM SQL query
From: Hans Christian Riksheim <HCR AT STERIA DOT NO>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 13 Oct 2004 10:43:09 +0200
Hi,
 
I am trying to make some useful reports by queryring the TSM database,
but I can not find out how to fetch the first N rows in that query. In
the DB2-manuals I find the "fetch" command, but it does not seem to work
here. Also tried googling and searching the archives here.
 
 
Example where I only want the first 20 results:
 
select filespaces.node_name as "NODE", filespaces.filespace_name as
"FILESYSTEM_NAME", substr(char(filespaces.backup_end), 1, 10) as
"LAST_BACKUP" from filespaces order by 3 asc fetch first 20 rows only

I am using Tivoli Storage Manager version 5, Release 1, Level 7.3

 

 

Thanks,

 

Hans Chr. Riksheim