It is currently 18 Oct 2017 4:13


Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Query Resources the jobs
PostPosted: 20 Jun 2011 10:40 
Offline
Nouveau
Nouveau
User avatar

Joined: 11 Aug 2009 12:00
Posts: 166
Hi to all.

I need to know that jobs use two unique resources.

I did a query but duplicate jobs:

select a.job_name, b.RESOURCE_
from def_job a, DEF_LNKI_C b
where RESOURCE_ = 'SINCMULT01'
and a.JOB_ID=b.JOB_ID

Or filter for two resources, the output is 0 rows, when there are jobs with both resources.


select a.job_name, b.RESOURCE_
from def_job a, DEF_LNKI_C b
where RESOURCE_ = 'SINCMULT01' and RESOURCE_ = 'COC700'
and a.JOB_ID=b.JOB_ID

Exists any query or way of knowing that jobs using these two resources.


Top
   
 Post subject:
PostPosted: 20 Jun 2011 8:04 
Offline
Nouveau
Nouveau
User avatar

Joined: 13 Jun 2007 12:00
Posts: 317
try this

SELECT JOB_NAME, A.RESOURCE_, B.RESOURCE_ FROM DEF_JOB AS J,
(SELECT RESOURCE_, JOB_ID, TABLE_ID FROM DEF_LNKI_C WHERE RESOURCE_='SINCMULT01') A,
(SELECT RESOURCE_, JOB_ID, TABLE_ID FROM DEF_LNKI_C WHERE RESOURCE_='COC700') B
WHERE J.JOB_ID=A.JOB_ID AND J.TABLE_ID=A.TABLE_ID
AND J.JOB_ID=B.JOB_ID AND J.TABLE_ID=B.TABLE_ID
AND A.JOB_ID=B.JOB_ID AND A.TABLE_ID=B.TABLE_ID


Top
   
 Post subject:
PostPosted: 21 Jun 2011 9:35 
Offline
Nouveau
Nouveau
User avatar

Joined: 11 Aug 2009 12:00
Posts: 166
Thanks very much for your reply.

Your answer is what I needed.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved