banner_bild_01 banner_bild_02 banner_bild_03 banner_bild_04 banner_bild_05
banner_bild_06 banner_bild_07 banner_bild_08

TSM SQL Advanced Tutorial (5)

button-home

Home SQL

arrow

Previous

Next

When processing long lists of data, you'll probably want to see only results matching certain criteria. In a previous example we extracted the capacity of file spaces, summed them up, grouped them by node name and sorted them descending by capacity:

select node_name, sum(capacity) as "capacity" from filespaces group by node_name -
order by "capacity" desc

This should give you a quick overview of the "biggest" clients, however if you want to reduce the output to clients having at least a certain amount of capacity, you can tell SQL to only display that information and exclude all "smaller" clients from the output. For that sort of functionality, we introduce the "having" clause. Having can be inserted into a query and will display only results matching the specified criteria. We assume that, based on the previous example, we want to see only clients having at least i.e. 15000 MB of capacity, we would write:

select node_name, sum(capacity) as "capacity" from filespaces group by node_name -
having sum(capacity)>=15000 order by "capacity" desc

"having" will only work after the "group by" and before the "order by" clause. Appending "having" to "order by" will cause an SQL error in TSM. You can think of "having" as an alternative for "where" with the difference, that "having" works on results from "group by" rather than values from fields.

 Alle erwähnten Produkte und Bezeichnungen können eingetragene Warenzeichen der jeweiligen Hersteller sein und werden als solche betrachtet.
Bei Fragen oder Problemen kontaktieren Sie bitte info@general-storage.de

Navigation  | Über GS  |  Lösungen  |  ServiceReferenzen  |  Impressum  |  Download

© 2016 by General Storage GbR. Alle Rechte vorbehalten

arrow

Previous

Next

Kontaktieren Sie uns:

Telefon: +49 6206 157686
Telefax:  +49 6206 157687
E-Mail: info@general-storage.de

arrow
arrow
GS_Logo1_Neu
gse-logo

13th ISP Symposium 2017
26.-29. September 2017,
Cologne Marriott Hotel


IBM

SSW-2258:
An Alternative to NDMP for Network Attached Storage Backup 
with dsmISI MAGS


Kundenforum
IBM Spectrum Protect und Veeam Kundenform, 28. Juni 2017, Skyloft Frankfurt Airport


Pressemitteilung:
dsmISI for Veeam ermöglicht unbegrenzte Speicher für Backups

Hier nachlesen


General Storage Lösungen
Ready for IBM Tivoli Software

tivoli_ready