View apache2.conf
Timeout 100
KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 5
View price-events-today.sql
SELECT DECODE (PRICE_EVENT_TYPE,
'PC',
'Cambios de Precio',
'PS',
'Inicio de Promocion',
'PE',
'Fin de Promocion') PRICE_EVENT_TYPE,
DECODE (STATUS,
'N',
'Nuevo / Por Comenzar',
View gl-accounts-ebs.sql
SELECT st.id_flex_structure_code "Chart of Account Code",
sg.id_flex_num "Chart of Account Num",
sg.segment_name "Segment Name",
sg.application_column_name "Column Name",
sg.flex_value_set_id "Value Set Id",
sg1.application_column_name "Parent Column Name"
FROM apps.fnd_id_flex_structures st
INNER JOIN
apps.fnd_id_flex_segments sg
ON st.application_id = sg.application_id
View joins-en-oracle.sql
SELECT tabla1.columna, tabla2.columna
FROM tabla1
[NATURAL JOIN tabla2] -- o
[JOIN tabla 2 USING (nombre_columna)] -- o
[JOIN tabla2
ON (tabla1.nombre_columna = tabla2.nombre_columna)] -- o
[LEFT|RIGHT|FULL OUTER JOIN tabla2
ON (tabla1.nombre_columna = tabla2.nombre_columna)] -- o
[CROSS JOIN tabla2];
View consulta-jerarquica.sql
SELECT LEVEL, COD_EMPLEADO, CARGO
FROM EMPLEADOS
START WITH COD_EMPLEADO = 1
CONNECT BY REPORTA_A = PRIOR COD_EMPLEADO;
-- OUTPUT:
-- LEVEL COD_EMPLEADO CARGO
-- ----------------- ---------------------- --------------------
-- 1 1 CEO
View sql-row.sql
create table nums as
select level as num from dual
connect by level <= 100;
-- Table created.
select count(1) as cnt from nums;
-- CNT
-- ------------
View auto_increment-oracle.sql
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
View ejemplo-with-oracle12c.sql
-- 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
View comparacion-ventas-vs-inventario.sql
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
View Start-uc4agent.sh
# 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