Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE VIEW PKAUXILIAR_VIEW AS
- SELECT punto_id, id_med, TO_DATE(TO_CHAR(fecha_sol,'dd/mm/yyyy')) AS fech,
- TO_DATE(TO_CHAR(fecha_sol,'dd/mm/yyyy')) AS hora, SUM(cant_sol) AS cantsol, fue,
- '1' AS n_fue, ope, lote_id, 'A' AS estado
- FROM ripsmedicamentos
- WHERE estado = 0
- GROUP BY punto_id, id_med, lote_id, fue, ope, TO_CHAR(fecha_sol,'dd/mm/yyyy'), valor_tipo_entrega
- ORDER BY TO_CHAR(fecha_sol,'dd/mm/yyyy');
- SELECT * FROM PKAUXILIAR_VIEW viewp WHERE viewp.fech = TO_DATE('17/03/2011')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement