Hi masters of SQL,
I can't seem to get this query right and would appreciate any help you might offer.
I have an application that stores log data in a 10g db and want to get information regarding process starts and the completion status of the process.
Here is what I have tried:
My results look like this
NAME TIME RESULT
-------- -------------------- ------------------
NWAB27G 28-03-2008 07.44.33 none
GREI99N 28-03-2008 07.54.27 none
.
.
.
.
.
This is an example of a simple query for similar data
EVENTS
-------------------------------------------------
your process 11189 was initiated at connection
.
.
.
.
Here is an example for a "success"
EVENTS
-------------------------------------------------
your process 11189 completed with status success
.
.
.
.
Here is an example for a "failure"
EVENTS
-------------------------------------------------
your process 22730 completed with status failure
.
.
.
.
Thanks in advance for your help.
-Joe
I can't seem to get this query right and would appreciate any help you might offer.
I have an application that stores log data in a 10g db and want to get information regarding process starts and the completion status of the process.
Here is what I have tried:
Code:
select name, time, case events
when '%initiated%' then initiated
when '%success%' then success
when '%failure%' the failured
else 'none'
end as result
from log where (events like '%initiated%' or events like '%success%' or events like '%failure%')
order by name desc, time;
My results look like this
NAME TIME RESULT
-------- -------------------- ------------------
NWAB27G 28-03-2008 07.44.33 none
GREI99N 28-03-2008 07.54.27 none
.
.
.
.
.
This is an example of a simple query for similar data
Code:
select events from log where events like '%initiated%';
-------------------------------------------------
your process 11189 was initiated at connection
.
.
.
.
Here is an example for a "success"
Code:
select events from log where events like '%success%';
-------------------------------------------------
your process 11189 completed with status success
.
.
.
.
Here is an example for a "failure"
Code:
select events from log where events like '%failure%';
-------------------------------------------------
your process 22730 completed with status failure
.
.
.
.
Thanks in advance for your help.
-Joe