ok.. this is an easy one but I can't figure it out... maybe I need more coffee..
This is on DB2 7.1
I have a table called staging.tracking.
Certain jobs write their name to it and a number.
What I want is :
if jobs ran, list their name and corresponding number
if no jobs ran write 'NO JOBS' (or just zero if you will, I can trap it)
I figured this would work, but it doesn't
select count(*), jobname, jobcount
from staging.tracking
group by jobname, jobcount ;
However, it returns nothing. (not zero, nothing)
It works without jobname and jobcount (i.e. it returns zero)
How can I do this ??
This is on DB2 7.1
I have a table called staging.tracking.
Certain jobs write their name to it and a number.
What I want is :
if jobs ran, list their name and corresponding number
if no jobs ran write 'NO JOBS' (or just zero if you will, I can trap it)
I figured this would work, but it doesn't
select count(*), jobname, jobcount
from staging.tracking
group by jobname, jobcount ;
However, it returns nothing. (not zero, nothing)
It works without jobname and jobcount (i.e. it returns zero)
How can I do this ??