You are on page 1of 6

:::::::::::::::::::STOCK MYSLQ::::::::::::::::::::::::::::::::::::::::: QUERY PARA PRODUCCION MENSUAL SUMANDO Y AGRUPANDO POR ARTICULO: SELECT stock.idarticulo,stock.cod,stock.codalt,stock.desig, date(ficha.fechamov) , ficha.numcomprob, sum(ficha.

ingreso) as suma from stock, ficha WHERE stock.i darticulo=ficha.idarticulo AND ficha.ingreso>0 and stock.clase="JT" and ficha.fe chamov>'2013-07-31' and ficha.fechamov<'2013-10-01' group by cod order by cod QUERY QUE TRAE LA FORMULA DEL ARTICULO INGRESADO: SELECT stock.idarticulo,stock.cod,stock.codalt,stock.desig,formulas.codif from s tock, formulas WHERE stock.cod=formulas.codif AND formulas.cod="0383738" ORDER B Y stock.desig QUERY PARA TRAER LAS ENTRADAS QUE DIERON VALOR NEGATIVO: SELECT stock.idarticulo,stock.cod,stock.codalt,stock.desig, ficha.fechamov, fich a.numcomprob, ficha.ingreso,ficha.egreso, ficha.saldo from stock, ficha WHERE stock.idarticulo=ficha.idarticulo AND ficha.saldo<0 AND stock.clase="JT" QUERY QUE TRAE LOS MOVIMIENTOS DEL ARTICULO INGRESADO: SELECT ficha.fechamov as fecha,ficha.tipcomprob, ficha.numcomprob, ficha.saldant , ficha.ingreso,ficha.egreso, ficha.saldo from stock, ficha WHERE stock.idarti culo=ficha.idarticulo and stock.cod=0471100 ORDER by fecha asc

::::::::::::::::::::::::::::::::::::::::VER VICS:::::::::::::::::::::::::::::::: :::::::: SELECT stock.idarticulo,stock.cod,stock.codalt,stock.desig, date(ficha.fechamov) , ficha.numcomprob, ficha.ingreso as ingreso, ficha.egreso as egreso FROM stock, ficha WHERE stock.idarticulo=ficha.idarticulo and stock.clase="JT" and ficha.numcomprob=014219 group by cod order by cod

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::

ABOVE EXPERIMENTAL CON TOTALES: SELECT ficha.fechamov as fecha,ficha.tipcomprob, ficha.numcomprob, ficha.saldant , ficha.ingreso,ficha.egreso, ficha.saldo from stock, ficha WHERE stock.idarticulo=ficha.idarticulo and stock.cod=4071106 UNION SELECT "x","", "TOTALES",sum(ficha.saldant), sum(ficha.ingreso),sum(ficha.egreso ), sum(ficha.saldo) from stock, ficha

WHERE stock.idarticulo=ficha.idarticulo and stock.cod=4071106 ORDER by fecha asc ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::REMITOS ENVIADOS::::::::::::::::::::::::::::::::::::::::: :::::::: select date(remitos.fecha)as fecha, remitos.numero,archivos.nombre,artxremito.st ock_id, artxremito.stockdesig, artxremito.cantidad, artxremito.unidadxbulto as U xB,artxremito.cantidadbultos as Blts, destinos.nombre from remitos, archivos,artxremito,destinos where artxremito.remitos_id=remitos.id and remitos.archivo_id=archivos.id and de stinos.id=remitos.destino_id and fecha > '2013-05-02' and artxremito.stockdesig like '%cocol%' and artxremito.stockdesig like '%%' and artxremito.stock_id like '%%' order by remitos.fecha asc,archivos.nombre limit 500 :::::::::::::::::::::::RECEPCION DE MATERIALES:::::::::::::::::::::::::::::::::: :::::::: QUERY PARA VER TODAS LAS ENTRADAS: select date(planillas.fecha), planillas.numero,proveedores.nombre,materiales.num eroremito, materiales.material,materiales.cantidad,materiales.unidad from planillas,materiales,proveedores where planillas.id=materiales.planilla_id and proveedores.id=materiales.proveedo r_id order by planillas.fecha asc CON UN 'LIKE' AGREGADO PARA FILTRAR MATERIALES: select materiales.id, date(planillas.fecha) as fecha, planillas.numero,proveedor es.nombre,materiales.numeroremito, materiales.material,materiales.cantidad,mater iales.unidad from planillas,materiales,proveedores where planillas.id=materiales.planilla_id and proveedores.id=materiales.proveedo r_id AND materiales.material like '%cub%' and materiales.material like '%12%' and proveedores.nombre like '%%' order by planillas.fecha asc CON UN 'LIKE' PARA FILTRAR POR PROVEEDOR: select date(planillas.fecha), planillas.numero,proveedores.nombre,materiales.num eroremito, materiales.material,materiales.cantidad,materiales.unidad from planillas,materiales,proveedores where planillas.id=materiales.planilla_id and proveedores.id=materiales.proveedo r_id AND materiales.proveedor_id=(select id from proveedores where proveedores.n ombre like '%Clarian%') order by planillas.fecha asc

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::ORDENES DE PRODUCCION::::::::::::::::::::::::::::::::::::: QUERY CON LIKE QUE FILTRA POR DESIGNACION: select date(planillas.fecha) as fecha, planillas.numero,ordenes.desig,ordenes.material_id,ordenes.cantidad,ordenes.boca s,ordenes.ciclo,ordenes.horas,ordenes.golpes,ordenes.dias from planillas,ordenes where planillas.id=ordenes.planilla_id AND ordenes.desig like '%oso%' AND orden es.desig like '%%' order by planillas.fecha asc :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::

:::::::::::::::::::::::::MATERIA PRIMA:::::::::::::::::::::::::::::::::::::::::: :::::::

SELECT materiales.id,tipo.desig,materiales.desig,materiales.color,materiales.sto ck FROM materiales,tipo WHERE materiales.tipo_id=tipo.id

:::::::::::::::::::::CAMIONERO FURGON::::::::::::::::::::::::::::::::::::::::::: ::::::::::::: insert into camionero_tractor(camionero_id,tractor_id,fecha) values(23,25,'2012-11-16') ; insert into camionero_furgon(camionero_id,furgon_id,fecha) values(23,27,'2012-11-16') ::::::::::::::::::::::ULTIMO TRACTOR Y FURGON CON EL QUE LLEGO CAMIONERO:::::::: ::::::::::::::::: select empresas.nombre,camioneros.id,camioneros.nombre,tractores.patente as Last Patente,furgones.patente as LastFurgon, camionero_furgon.fecha from empresas, camioneros,camionero_furgon,furgones,tractores,camionero_tractor where empresas.id=camioneros.empresas_id and furgones.id=camionero_furgon.furgon _id and camioneros.id=camionero_furgon.camionero_id and tractores.id=camionero_tractor.tractor_id and camioneros.id=camionero_tractor.camionero_id group by camioneros.id order by camioneros.id :::::::::::::::::::::::::::HISTORIAL TRACTOR-FURGON DE CADA CAMIONERO::::::::::: ::::::::::::::::..

select camionero_furgon.id,camionero_furgon.fecha,camioneros.id as Cid,camionero s.nombre,tractores.id as Tid,tractores.patente,furgones.id as Fid,furgones.paten te from camioneros,camionero_furgon,furgones,tractores, camionero_tractor where camioneros.id=3 and camionero_furgon.camionero_id=camioneros.id and camionero_furgon.furgon_id=f urgones.id and camionero_tractor.camionero_id=camioneros.id and camionero_tractor.tractor_i d=tractores.id and camionero_furgon.id=camionero_tractor.id and camionero_furgon .fecha=camionero_tractor.fecha order by camionero_furgon.fecha desc :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::

SELECT stock.idarticulo,stock.cod,stock.codalt,stock.desig, date(ficha.fechamov) , ficha.numcomprob, sum(ficha.ingreso) as suma from stock, ficha WHERE stock.i darticulo=ficha.idarticulo AND ficha.ingreso>0 and stock.clase="JT" and ficha.fe chamov>'2012-03-31' and ficha.fechamov<'2012-05-01' group by codalt order by cod alt

select date(planillas.fecha) as fecha, planillas.numero,proveedores.nombre,mater iales.numeroremito, materiales.material,materiales.cantidad,materiales.unidad from planillas,materiales,proveedores where planillas.id=materiales.planilla_id and proveedores.id=materiales.proveedo r_id AND materiales.material like '%%' and materiales.material like '%%' and fecha>'2011-08-31' and fecha<'2012-08-31' and proveedores.nombre not like '%clariant%' and proveedores.nombre not like '%ferrima%' and proveedores.nombre not like '%quiplast%' and proveedores.nombre not like '%mecalux%' and proveedores.nombre not like '%advance%' and proveedores.nombre not like '%Compressors%' and proveedores.nombre not like '%Verion%' and proveedores.nombre not like '%Vasile%' and proveedores.nombre not like '%Electricidad Lynch%' and proveedores.nombre not like '%Sanitarios sione%' and proveedores.nombre not like '%euromel%' and proveedores.nombre not like '%Femavi%' and proveedores.nombre not like '%Freeport%'

and and and and and and and and and and

proveedores.nombre proveedores.nombre proveedores.nombre proveedores.nombre proveedores.nombre proveedores.nombre proveedores.nombre proveedores.nombre proveedores.nombre proveedores.nombre

not not not not not not not not not not

like like like like like like like like like like

'%SAF S.H.%' '%Simko%' '%Recy pack%' '%Enimar%' '%helci%' '%Enrico y Bredice%' '%Indutrab s.r.l%' '%Norder s.a.%' '%Industrias Saladillo s.a%' '%Roma Pack s.a%'

and and and and and and and and and and and and and and and and and and and and and and and and and and and and and and and

materiales.material not like '%estuches%' proveedores.nombre not like '%vaseplus%' materiales.material not like '%molde%' materiales.material not like '%master%' materiales.material not like '%remafin%' materiales.material not like '%documentac%' materiales.material not like '%desmoldante%' materiales.material not like '%roturas%' materiales.material not like '%carton%' materiales.material not like '%pliego%' materiales.material not like '%metal%' materiales.material not like '%soldador%' materiales.material not like '%hotmeal%' materiales.material not like '%paula%' materiales.material not like '%aceite%' materiales.material not like '%troquel%' materiales.material not like '%acido%' materiales.material not like '%hilo%' materiales.material not like '%filtro%' materiales.material not like '%elastico%' materiales.material not like '%filtro%' materiales.material not like '%piezas de importacion p/controlar%' materiales.material not like '%Caja de embalaje%' materiales.material not like '%ABS POLYLAC%' materiales.material not like '%Ciano%' materiales.material not like '%glext%' materiales.material not like '%limpieza%' materiales.material not like '%peliculas y chapas%' materiales.material not like '%Cinta adhesiva%' materiales.material not like '%tinta grafito%' materiales.material not like '%hidrauli%'

order by proveedores.nombre asc Sr. Raul Asef Tel: 0346 - 15 7447425 x4 Retira en depsito de rosario darle el telfono de antex al camionero par aque maana a eso de las 15 llame para c onfirmar que llega a las 7

Johnattan Sandoval - Tarjeta Shopping -0810 333 9279

You might also like