$product
$requestedQuantityErr
$productPkgIdErr
$assigneeDep
$assigneeOffice
$assigneeSection
$assigneeUnit
$assigneeRank
$StaffNumber
$VisaNumber
$QID
RQ1_ID, RQ1_MODE, RQ1_MID, RQ1_MMODE,
RQ1_CUS_HOLDING_ID,
RQ1_PRODUCT_ID,
RQ1_PRODUCT_NUMBER,
RQ1_PRODUCT_STATE,
RQ1_PRODUCT_STATE_V,
RQ1_REQESTED_QUANTITY,
RQ1_ISSUED_QUANTITY,
RQ1_CONVERSION_RATE,
RQ1_LOCK_ID,
RQ1_CREATED_USER_ID, RQ1_CREATED_USER_ROLE,
RQ1_CREATED_USER_SMP,
RQ1_ASSIGNEE_ID,
RQ1_CUS_TYPE, RQ1_CUS_TYPE_V, RQ1_PRODUCT_UOM_ID,
P.PR0_NAME_ARABIC,
P.PR0_DESCRIPTION,
DECODE(P.PR0_IS_SERIAL_DEFINED,'Y','true','N','false') as
PR0_IS_SERIAL_DEFINED,
RQ1_ASSIGNEE_TYPE_V,
RQ1_ASSIGNEE_TYPE,
RQ1_ASSIGNEE_QIDNO, RQ1_ASSIGNEE_RANK, RQ1_ASSIGNEE_STAFF_NUMBER,
RQ1_ASSIGNEE_DEPARTMENT, RQ1_PRODUCT_PKG_ID ,
RQ1_ASSIGNEE_OFFICE_ID, RQ1_ASSIGNEE_SECTION_ID,
RQ1_ASSIGNEE_UNIT_ID,
RQ1_ASSIGNEE_VISA_NUM, RQ1_ASSIGNEE_ID AS
ASSIGNEE_DESC,
RQ1_PRODUCT_UNIT_PRICE,
RQ1_PRODUCT_TOTAL_PRICE,RQ1_ASSIGNEE_PLATE_TYPE,
RQ1_ASSIGNEE_PLATE_NUMBER,
(SELECT COM_DEP_ARABIC_NAME FROM
VCOM_DEP WHERE
VCOM_DEP.COM_DEP_NUMBER=RQ1_ASSIGNEE_DEPARTMENT) as
DEP_NAME_ARABIC,
(SELECT COM_DEP_ENGLISH_NAME FROM VCOM_DEP WHERE
VCOM_DEP.COM_DEP_NUMBER=RQ1_ASSIGNEE_DEPARTMENT) as
DEP_NAME_ENGLISH,
(SELECT CON_SEC_ARABIC_NAME FROM VCON_SECTION
WHERE
VCON_SECTION.CON_ID=RQ1_ASSIGNEE_SECTION_ID) as
SECTION_NAME_ARABIC,
(SELECT CON_SEC_ENGLISH_NAME FROM
VCON_SECTION WHERE
VCON_SECTION.CON_ID=RQ1_ASSIGNEE_SECTION_ID) as
SECTION_NAME_ENGLISH,
(SELECT COO_UNIT_ARABIC_NAME FROM VCOO_UNIT
WHERE
VCOO_UNIT.COO_ID=RQ1_ASSIGNEE_UNIT_ID) as UNIT_NAME_ARABIC,
(SELECT COO_UNIT_ENGLISH_NAME FROM VCOO_UNIT WHERE
VCOO_UNIT.COO_ID=RQ1_ASSIGNEE_UNIT_ID) as UNIT_NAME_ENGLISH,
(Select VPR1_PRODUCT_PKG.PR1_PKG_NAME_ENGLISH FROM VPR1_PRODUCT_PKG where VPR1_PRODUCT_PKG.PR1_ID = RQ1_PRODUCT_PKG_ID) as PKG_ENGLISH,
(Select VPR1_PRODUCT_PKG.PR1_PKG_NAME_ARABIC FROM VPR1_PRODUCT_PKG where VPR1_PRODUCT_PKG.PR1_ID = RQ1_PRODUCT_PKG_ID) as PKG_ARABIC,
(SELECT CU2_OFFICE_AR_NAME FROM VCU2_MOI_OFFICES WHERE
VCU2_MOI_OFFICES.CU2_DEPOFFICE_ID=RQ1_ASSIGNEE_OFFICE_ID) as
OFFICE_NAME_ARABIC,
(SELECT CU2_OFFICE_EN_NAME FROM
VCU2_MOI_OFFICES WHERE
VCU2_MOI_OFFICES.CU2_DEPOFFICE_ID=RQ1_ASSIGNEE_OFFICE_ID) as
OFFICE_NAME_ENGLISH,
RQ1_LASTUPDATED_USER_ID, RQ1_LASTUPDATED_USER_ROLE,
RQ1_LASTUPDATED_USER_SMP, RQ1_REQESTED_QUANTITY/RQ1_CONVERSION_RATE REQUESTED_QUANTITY
VRQ1_REQUISITION_DETAIL
RD left join VPR0_PRODUCT P
on(P.PR0_PRODUCT_ID=RD.RQ1_PRODUCT_ID)