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
nt: donderdag 26 maart 2020 17:34 To: ADSM-L@VM.MARIST.EDU Subject: R: [ADSM-L] Combining SQL queries I need to use different syntax from the one of Eric, like: select * from (select count(*) as "Number_Of_Failed" from events where scheduled_start>current_timestamp-24 hours and status='F

Re: Combining SQL queries

2020-03-27 Thread Loon, Eric van (ITOP NS) - KLM
lini Sent: donderdag 26 maart 2020 17:34 To: ADSM-L@VM.MARIST.EDU Subject: R: [ADSM-L] Combining SQL queries I need to use different syntax from the one of Eric, like: select * from (select count(*) as "Number_Of_Failed" from events where scheduled_start>current_timestamp-24 hours a

R: [ADSM-L] Combining SQL queries

2020-03-26 Thread Tommaso Bollini
where scheduled_start>current_timestamp-24 hours and status='Missed') as missed since I've got a 'ANS8001I Return code 28' Tom. -Messaggio originale- Da: ADSM: Dist Stor Manager Per conto di Skylar Thompson Inviato: giovedì 26 marzo 2020 17:14 A: ADSM-L@VM.MARIST.EDU Oggetto: Re: [ADSM-L] Comb

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

Combining SQL queries

2020-03-26 Thread Loon, Eric van (ITOP NS) - KLM
Hi guys, I have two SQL queries: select count(*) as "Number_Of_Failed" from events where scheduled_start>current_timestamp-24 hours and status='Failed' select count(*) as "Number_Of_Missed" from events where scheduled_start>current_timestamp-24 hours and status='Missed' Is it somehow possible