Hi Eric, You need to add an WHERE additional criterion like this:
occupancy.node_name = nodes.node_name Best regards, Andy Andy Raibeck IBM Software Group Tivoli Storage Manager Client Product Development Level 3 Team Lead Internal Notes e-mail: Andrew Raibeck/Tucson/i...@ibmus Internet e-mail: stor...@us.ibm.com IBM Tivoli Storage Manager support web page: http://www.ibm.com/software/sysmgmt/products/support/IBMTivoliStorageManager.html The only dumb question is the one that goes unasked. The command line is your friend. "Good enough" is the enemy of excellence. "ADSM: Dist Stor Manager" <ADSM-L@VM.MARIST.EDU> wrote on 01/27/2009 05:18:06 AM: > [image removed] > > SQL query question > > Loon, EJ van - SPLXM > > to: > > ADSM-L > > 01/27/2009 05:18 AM > > Sent by: > > "ADSM: Dist Stor Manager" <ADSM-L@VM.MARIST.EDU> > > Please respond to "ADSM: Dist Stor Manager" > > Hi *SM-ers! > I'm trying to create an SQL query to list all filespaces with more than > 500 Gb. stored in TSM, but only for nodes belonging to a certain > department. I want to use the contact field for this, but I must be > doing something wrong, because it still lists all nodes. Here's what I > created thus far: > > select occupancy.node_name as "Node Name", occupancy.filespace_name as > "File System", cast(float(occupancy.physical_mb) as dec(10,0)) as > "Megabytes" from occupancy, nodes where occupancy.stgpool_name like > '%PRI%' and nodes.contact='Linux Department' and occupancy.physical_mb > >=500000 > > Could someone help me with creating the correct SQL statement? > Thank you VERY much in advance!! > Kindest regards, > Eric van Loon > KLM Royal Dutch Airlines > > > ********************************************************************** > For information, services and offers, please visit our web site: > http://www.klm.com. This e-mail and any attachment may contain > confidential and privileged material intended for the addressee > only. If you are not the addressee, you are notified that no part > of the e-mail or any attachment may be disclosed, copied or > distributed, and that any other action related to this e-mail or > attachment is strictly prohibited, and may be unlawful. If you have > received this e-mail by error, please notify the sender immediately > by return e-mail, and delete this message. > > Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries > and/or its employees shall not be liable for the incorrect or > incomplete transmission of this e-mail or any attachments, nor > responsible for any delay in receipt. > Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal > Dutch Airlines) is registered in Amstelveen, The Netherlands, with > registered number 33014286 > **********************************************************************