This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- To verify if a POSU file was successfully loaded even though the job "POSUPLD.PC" culminates in ABORTED, without errors or rejected items, verify the following query at the time it aborts: | |
select * from tran_data | |
where location=&idstore -- Store | |
and tran_date='&salesdate' -- Sales date | |
and pgm_name='posupld'; | |
-- To verify the day after the batch | |
select * from if_tran_data | |
where location=&idstore -- Store | |
and tran_date='&salesdate' -- Sales date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE SEQUENCE dept_seq; | |
CREATE TABLE departments ( | |
ID NUMBER(10) NOT NULL, | |
DESCRIPTION VARCHAR2(50) NOT NULL); | |
CREATE OR REPLACE TRIGGER dept_bir | |
BEFORE INSERT ON departments | |
FOR EACH ROW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Para leer explicación ir a http://arbo.com.ve/2016/02/19/sentencia-with-novedades-oracle-12c/ | |
WITH | |
FUNCTION sumar(valor1 in number, valor2 in number) RETURN number IS | |
BEGIN | |
RETURN valor1 + valor2; | |
END; | |
SELECT sumar(a,b) suma from ( | |
SELECT 23 a, 51 b from dual | |
UNION ALL | |
SELECT 87 a, 21 b from dual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH | |
RESA AS | |
( | |
SELECT STD.BUSINESS_DATE FECHA,STD.STORE STORE,COUNT(DISTINCT STI.ITEM) ITEMS, SUM(STI.QTY) UNIDADES | |
FROM SA_TRAN_ITEM STI | |
JOIN SA_TRAN_HEAD STH | |
ON (STI.TRAN_SEQ_NO = STH.TRAN_SEQ_NO) | |
JOIN SA_STORE_DAY STD | |
ON (STD.STORE_DAY_SEQ_NO = STH.STORE_DAY_SEQ_NO) | |
WHERE STD.BUSINESS_DATE =&p_sales_date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Conectarse por línea de comandos al nodo con error con el usuario UC4. | |
# 2. Ir al directorio home de UC4 | |
cd $AW_HOME | |
# 3. Ejecutar: | |
# Para levantar: | |
./uc4am.sh start | |
# Para detener: | |
./uc4am.sh stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Tabla de Maestro de Artículos | |
select * from AS_ITM where id_itm='&codigoitem'; | |
--Tabla Item / Location | |
select * from RK_ITM_LCN where id_itm='&codigoitem'; | |
--Solicitudes de Inventario | |
select * from rk_item_request where item_request_id=&itemrequesid; | |
select * from RK_ITEM_REQUEST_LINE_ITEM where item_request_id=&itemrequesid; --Detalle de Solicitud de Inventario |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Query para determinar si las ordenes de compra fueron publicadas en RIB | |
select published, count(1) | |
from ( | |
select distinct opi.* | |
from ordloc ol, ordhead oh, order_pub_info opi | |
where ol.location = 49 | |
and oh.order_no = ol.order_no | |
and ol.order_no = opi.order_no | |
) | |
group by published; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Con el siguiente query podemos ver el status de los tablespaces o unidades lógicas de almacenamiento de la base de datos: | |
SELECT A.tablespace_name tablespace_name, | |
to_char(TRUNC(NVL(SUM(B.BYTES/1048576),0) / (A.BYTES/1048576),4)*100)||'%' pct_free, | |
100 - to_char(TRUNC(NVL(SUM(B.BYTES/1048576),0) / (A.BYTES/1048576),4)*100)||'%' pct_used, | |
NVL(TRUNC(SUM(B.BYTES/1048576),2),0)||'MB' FREE_SPACE, | |
TRUNC((A.BYTES/1048576)-NVL(SUM(B.BYTES/1048576),2),0)||'MB' USED_SPACE, | |
TRUNC(A.BYTES/1048576,2)||'MB' FILE_SIZE, | |
autoextensible, status | |
FROM DBA_DATA_FILES A, DBA_FREE_SPACE B | |
WHERE A.FILE_ID=B.FILE_ID (+) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
case "$1" in | |
start) echo "Starting iptables NAT" | |
#----------------------------------------------------------------- | |
#START NAT ///////////////////////////// | |
#----------------------------------------------------------------- | |
/sbin/iptables -t nat -A POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE #BRIDGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_POST['first_name'])){ | |
echo json_encode($_POST); | |
exit; | |
} | |
?> | |
<html> | |
<head> | |
<title>Test Serialize Array</title> | |
<script src="http://code.jquery.com/jquery-2.2.0.min.js"></script> |