Reportes Costos - Reemplazo DATASTAGE
select substr(jcfndfuf2,1,instr(jcfndfuf2,’_’,1)-1) REPORT , substr ( jcfndfuf2, instr(jcfndfuf2,’_’,1,1) +1 , instr(jcfndfuf2,’_’,1,2) - instr(jcfndfuf2,’_’,1,1)-1 ) VERSION ,
to_date(SUBSTR(jcsbmdate,2,6) || lpad(to_char(jcsbmtime),6,’0’),’YYDDDHH24MISS’) SUBMIT,
to_date(SUBSTR(JCACTDATE,2,6) || lpad(to_char(jcACTTIME),6,’0’),’YYDDDHH24MISS’) LAST,
(to_date(SUBSTR(JCACTDATE,2,6) || lpad(to_char(jcACTTIME),6,’0’),’YYDDDHH24MISS’) - to_date(SUBSTR(jcsbmdate,2,6) || lpad(to_char(jcsbmtime),6,’0’),’YYDDDHH24MISS’)) * 86400 seg ,
((to_date(SUBSTR(JCACTDATE,2,6) || lpad(to_char(jcACTTIME),6,’0’),’YYDDDHH24MISS’) - to_date(SUBSTR(jcsbmdate,2,6) || lpad(to_char(jcsbmtime),6,’0’),’YYDDDHH24MISS’)) * 86400 )/60 Min ,
((to_date(SUBSTR(JCACTDATE,2,6) || lpad(to_char(jcACTTIME),6,’0’),’YYDDDHH24MISS’) - to_date(SUBSTR(jcsbmdate,2,6) || lpad(to_char(jcsbmtime),6,’0’),’YYDDDHH24MISS’)) * 86400 )/3600 hs
, jcsbmdate,jcsbmtime,jcjobque ,jcuser ,jcexehost,jcjobnbr
from svm900.f986110 where substr(jcfndfuf2,1,instr(jcfndfuf2,’_’,1)-1) in
(’R5900086’,’R5900087B’,’R5900090A’,’R5900079’,’R5900684’,’R5900083’,’R5900683’,
’R5900681’,’R5900677’,’R5900679’,’R5900660’,’R5900668’,’R5900661’,’R5900664’,
’R5900663’,’R5900665’,
’R5900662’,’R5900666’,’R5900669’,’R5900667’,’R5900674’,’R5900673’,’R5900676’,
’R5900075’,’R5900682’,’R5900088’,’R5900680’,’R5900685’,’R5900677’,’R5900686’)
0 comentarios