Re: Combining SQL queries

2020-03-31 Thread Neil Duffee
Norgauer 2004 "Schrodinger's backup: The condition of any backup is unknown until a restore is attempted." John McKown 2015 -Original Message- From: Loon, Eric van (ITOP NS) - KLM Sent: March 30, 2020 5:31 AM Subject: Re: Combining SQL queries Although Tom's SQL statement works very well,

Re: Combining SQL queries

2020-03-30 Thread Loon, Eric van (ITOP NS) - KLM
Hi all, Although Tom's SQL statement works very well, there seems to be something weird in the way the WHERE statement is handled. This is the output on a server with a directory container pool: select * from (select cast(sum(used_db_space_mb/tot_file_system_mb*100) as decimal(3,1)) as

Re: Combining SQL queries

2020-03-27 Thread Loon, Eric van (ITOP NS) - KLM
Hi Tom, This one does exactly what I was looking for: single line, multiple columns in SPOC, thanks! Everybody, thank you very much for your help! Kind regards, Eric van Loon Air France/KLM Storage & Backup -Original Message- From: ADSM: Dist Stor Manager On Behalf Of Tommaso Bollini

Re: Combining SQL queries

2020-03-26 Thread Skylar Thompson
Hi Eric, You can combine these two queries by executing them as subqueries: select * from ( select count(*) as "Number_Of_Failed" from events where scheduled_start>current_timestamp-24 hours and status='Failed' ) failed, ( select count(*) as "Number_Of_Missed" from events where

Re: Combining SQL queries

2020-03-26 Thread David Bronder
Something like this (name columns as desired): select status, count(*) from events - where scheduled_start>current_timestamp-24 hours and - ( status='Failed' or status='Missed' ) - group by status On 3/26/20 10:51 AM, Loon, Eric van (ITOP NS) - KLM wrote: > Hi guys, > > I have two SQL