Diferencia entre revisiones de «Arreglo Tilde Concursados- RHUN»

De Wiki
Saltar a: navegación, buscar
Línea 19: Línea 19:
 
select distinct hs_dedic,hs_dedic*20/30 as hs_reloj,left(CONVERT(hs_dedic*20/30, SQL_CHAR),locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR)))+SUBSTRING (CONVERT(hs_dedic*20/30, SQL_CHAR), locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR))+1, 2)  from dh03 where codc_categ in ('318','320','321')  IF (predicate, expression1, expression2)
 
select distinct hs_dedic,hs_dedic*20/30 as hs_reloj,left(CONVERT(hs_dedic*20/30, SQL_CHAR),locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR)))+SUBSTRING (CONVERT(hs_dedic*20/30, SQL_CHAR), locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR))+1, 2)  from dh03 where codc_categ in ('318','320','321')  IF (predicate, expression1, expression2)
  
select distinct hs_dedic,IF (hs_dedic/left(CONVERT(hs_dedic*20/30, SQL_CHAR),locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR))), left(CONVERT(hs_dedic*20/30, SQL_CHAR),locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR)))+SUBSTRING (CONVERT(hs_dedic*20/30, SQL_CHAR), locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR))+1, 2) from dh03 where codc_categ in ('318','320','321') from dh03 where codc_categ in ('318','320','321')  
+
select distinct hs_dedic,IF ((hs_dedic/(left(CONVERT(hs_dedic*20/30, SQL_CHAR),locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR)))))>0, left(CONVERT(hs_dedic*20/30, SQL_CHAR),locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR)))+SUBSTRING (CONVERT(hs_dedic*20/30, SQL_CHAR), locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR))+1, 2) from dh03 where codc_categ in ('318','320','321') from dh03 where codc_categ in ('318','320','321')  
  
 
4) una vez ejecutadas los updates pasar el DH03.DAT a el pampa rhun que se esta procesando
 
4) una vez ejecutadas los updates pasar el DH03.DAT a el pampa rhun que se esta procesando

Revisión del 14:07 11 sep 2014

1) Copiar dh03.dat desde el pampa rhun a un Pampa en c:\ (crear conexion Pervasive a ese pampa c)

2) Abrir una Pervasive, conexion a Pampa c via control center

3) loguearse como Master

SELECT count(*) FROM "DH03" where cargo_concursado=0 AND codc_carac='CONC'

update "DH03" set cargo_concursado=1 where cargo_concursado=0 AND codc_carac='CONC'


SELECT count(*) FROM "DH03" where cargo_concursado=1 AND codc_carac<>'CONC'

update "DH03" set cargo_concursado=0 where cargo_concursado=1 AND codc_carac<>'CONC'

select * from dh03 where codc_categ='320' update "DH03" set hs_dedic=TRUNCATE(hs_dedic*20/30,2) where codc_categ in ('318','320','321')

select distinct hs_dedic,hs_dedic*20/30 as hs_reloj,left(CONVERT(hs_dedic*20/30, SQL_CHAR),locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR)))+SUBSTRING (CONVERT(hs_dedic*20/30, SQL_CHAR), locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR))+1, 2) from dh03 where codc_categ in ('318','320','321') IF (predicate, expression1, expression2)

select distinct hs_dedic,IF ((hs_dedic/(left(CONVERT(hs_dedic*20/30, SQL_CHAR),locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR)))))>0, left(CONVERT(hs_dedic*20/30, SQL_CHAR),locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR)))+SUBSTRING (CONVERT(hs_dedic*20/30, SQL_CHAR), locate(',',CONVERT(hs_dedic*20/30, SQL_CHAR))+1, 2) from dh03 where codc_categ in ('318','320','321') from dh03 where codc_categ in ('318','320','321')

4) una vez ejecutadas los updates pasar el DH03.DAT a el pampa rhun que se esta procesando