0% found this document useful (0 votes)
52 views

Codigo SQL

The document appears to be an SQL query that is selecting various fields from an INVAUDEE table including SKU code, description, reference numbers, inventory details, cost values, and other transaction attributes. It is joining the INVAUDEE table to an AUDIT_TMP table to filter the results by audit number. The query includes several calls to other packages and functions to retrieve additional descriptive fields like document number, business name, and negotiation attribute.

Uploaded by

Jose Franco
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

Codigo SQL

The document appears to be an SQL query that is selecting various fields from an INVAUDEE table including SKU code, description, reference numbers, inventory details, cost values, and other transaction attributes. It is joining the INVAUDEE table to an AUDIT_TMP table to filter the results by audit number. The query includes several calls to other packages and functions to retrieve additional descriptive fields like document number, business name, and negotiation attribute.

Uploaded by

Jose Franco
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1 ) SUCURSAL,

RPYP_PKG_GENERAL_PMM.RPYP_FUPMM_GET_CODE_DESC( 'PRDMSTEE', I.TRANS_PRD_CHILD, 0


) SKU_CODIGO,
RPYP_PKG_GENERAL_PMM.RPYP_FUPMM_GET_CODE_DESC( 'PRDMSTEE', I.TRANS_PRD_CHILD, 2
) SKU_DESCRIPCION,
I.TRANS_REF,
I.TRANS_REF2,
I.INV_MRPT_CODE,
I.INV_DRPT_CODE,
(SELECT INV.INV_DRPT_DESC FROM INVTRDEE INV WHERE I.INV_MRPT_CODE =
INV.INV_MRPT_CODE AND I.INV_DRPT_CODE = INV.INV_DRPT_CODE) INV_DRPT_DESC,
I.INV_EFF_QTY,
I.TRANS_QTY,
I.TRANS_COST,
I.TRANS_RETL,
I.INV_EFF_CST,
I.TRANS_EXT_COST,
I.PROC_SOURCE,
DECODE(1 ,0,'NO SOLICITADO',
rpy_pkg_pmm_rep_gestion.RPY_FNC_DOC_FISCAL_REF(I.INV_MRPT_CODE, I.INV_DRPT_CODE,
I.TRANS_REF, I.TRANS_REF2, I.TRANS_ORG_CHILD, I.TRANS_PRD_CHILD))AS DOC_FISCAL, --
Documento Fiscal
DECODE(1 ,0,'NO SOLICITADO',
rpy_pkg_pmm_rep_gestion.RPY_FNC_RAZ_SOCIAL(I.INV_MRPT_CODE, I.INV_DRPT_CODE,
I.TRANS_REF, I.TRANS_PRD_CHILD) )AS RAZ_SOCIAL, --Razon Social
DECODE(1 ,0,'NO SOLICITADO',
RPYP_PKG_GENERAL_PMM.RPYP_FUPMM_GET_ATRIBUTO(I.TRANS_PRD_CHILD, 12, 51, 2))AS
NEGOCIACION --Negociacion
FROM INVAUDEE I, AUDIT_TMP TMP
WHERE I.AUDIT_NUMBER = TMP.AUDIT_NUMBER

You might also like