Subversion Repositories DevTools

Rev

Rev 7278 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7278 Rev 7279
Line 3... Line 3...
3
--		Mark as selected any machine that matches :bmcon_id
3
--		Mark as selected any machine that matches :bmcon_id
4
--		Mark as disabled any machine that is already in use by :rtag_id, except :bmcon_id
4
--		Mark as disabled any machine that is already in use by :rtag_id, except :bmcon_id
5
--
5
--
6
--	Generate data suitable for filling in a MultiCombo Box
6
--	Generate data suitable for filling in a MultiCombo Box
7
 
7
 
8
SELECT AllMachines.BMCON_ID, AllMachines.display_name, AllMAchines.GBE_VALUE, AllMachines.DESCRIPTION, AllMachines.selected || NVL2(InUse.BMCON_ID, ' disabled', '') AS selected 
8
SELECT AllMachines.BMCON_ID, AllMachines.display_name, AllMAchines.GBE_VALUE, AllMachines.DESCRIPTION,
-
 
9
CASE 
-
 
10
    WHEN AllMachines.selected is not NULL THEN 'selected available'
-
 
11
    WHEN InUse.BMCON_ID is not NULL THEN 'disabled'
-
 
12
    ELSE 'available'
-
 
13
END as state,
-
 
14
AllMachines.selected, NVL2(InUse.BMCON_ID, ' disabled', ' available') AS available 
9
FROM  
15
FROM  
10
  
16
  
11
  (SELECT bm.bmcon_id, display_name, gbe_value,  
17
  (SELECT bm.bmcon_id, display_name, gbe_value,  
12
    COALESCE(SUBSTR(description,1,INSTR(description,CHR(10),1,1)),description) AS description,  
18
    COALESCE(SUBSTR(description,1,INSTR(description,CHR(10),1,1)),description) AS description,  
13
    DECODE(:bmcon_id, bm.bmcon_id, 'selected', NULL) AS SELECTED  
19
    DECODE(:bmcon_id, bm.bmcon_id, 'selected', NULL) AS SELECTED  
Line 18... Line 24...
18
    
24
    
19
  (SELECT BMCON_ID  
25
  (SELECT BMCON_ID  
20
  FROM release_config rc, gbe_machtype gbe  
26
  FROM release_config rc, gbe_machtype gbe  
21
  WHERE rc.rtag_id = :rtag_id  
27
  WHERE rc.rtag_id = :rtag_id  
22
  AND gbe.gbe_id   = rc.gbe_id
28
  AND gbe.gbe_id   = rc.gbe_id
23
  AND BMCON_ID != :bmcon_id    
-
 
24
  ) InUse  
29
  ) InUse  
25
    
30
    
26
WHERE AllMachines.BMCON_ID = InUse.BMCON_ID(+)  
31
WHERE AllMachines.BMCON_ID = InUse.BMCON_ID(+)  
27
ORDER BY UPPER(display_name)
32
ORDER BY UPPER(display_name)
28
 
33
 
29
 
34
 
-
 
35