Hello
I run one query to obtain a value until 30. I have to run the same query changing the condition from 30 to 60. Is posible to run in the same query this two results each one in one collum?
The query is:
select (CONVERT (VARCHAR,alarm_local_date,103)) AS DATA
, COUNT (full_clear_opactdisp_id) AS ALARMES
FROM ALARM_INCIDENT
WHERE (full_clear_opactdisp_id = 'ANL'
OR full_clear_opactdisp_id = 'CAN'
OR full_clear_opactdisp_id = 'CCA'
OR full_clear_opactdisp_id = 'CI'
OR full_clear_opactdisp_id = 'DDC'
OR full_clear_opactdisp_id = 'EA'
OR full_clear_opactdisp_id = 'EPL'
OR full_clear_opactdisp_id = 'FFS'
OR full_clear_opactdisp_id = 'FSA'
OR full_clear_opactdisp_id = 'FTL'
OR full_clear_opactdisp_id = 'MUE'
OR full_clear_opactdisp_id = 'PA'
OR full_clear_opactdisp_id = 'PAS'
OR full_clear_opactdisp_id = 'PJA'
OR full_clear_opactdisp_id = 'PSAE'
OR full_clear_opactdisp_id = 'PSE'
OR full_clear_opactdisp_id = 'SEM'
OR full_clear_opactdisp_id = 'RB'
OR full_clear_opactdisp_id = 'RC'
OR full_clear_opactdisp_id = 'REM'
OR full_clear_opactdisp_id = 'RI'
OR full_clear_opactdisp_id = 'RIC'
OR full_clear_opactdisp_id = 'RPP'
OR full_clear_opactdisp_id = 'RTL'
OR full_clear_opactdisp_id = 'VNR'
OR full_clear_opactdisp_id = 'VR')
AND (DATEDIFF(ss,alarm_local_date ,first_access_local_date ))<= '30'
AND alarm_local_date > '2007-07-11 00:00:00.000'
--AND alarm_local_date < '2006-05-03 00:00:00.000' --
GROUP BY (CONVERT (VARCHAR,ALARM_INCIDENT.alarm_local_date,103))
The condition I change in the second query is: "AND (DATEDIFF(ss,alarm_local_date ,first_access_local_date ))<= '60"
Thanks in advance.
J.Pais