Home » SQL & PL/SQL » SQL & PL/SQL » PLS-00103: Encountered the symbol "end-of-file"
PLS-00103: Encountered the symbol "end-of-file" [message #134423] Wed, 24 August 2005 18:43 Go to next message
fab123
Messages: 3
Registered: August 2005
Location: mel
Junior Member
I am getting the following error:

PROCEDURE DMDEV.VERS_CUSTOMER_PRODUCT_FACT
On line: 57
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with”


CREATE OR REPLACE PROCEDURE VERS_CUSTOMER_PRODUCT_FACT (iRunDate IN VARCHAR2) IS

/******************************************************************************
NAME: VERS_CUSTOMER_PRODUCT_FACT
PURPOSE: Using Data from the I_PR_CUST_PROD_ISSUE table Version/Delete the CUSTOMER_PRODUCT_FACT

lRunDate DATE;

BEGIN

lRunDate := DM_UTIL.CONV_RUNTIME(iRunDate);

-- Setup the sql statement to merge the data from I_PR_CUST_PROD_ISSUE into the
-- CUSTOMER_PRODUCT_FACT Table for versioned and deleted records only (ie those already existing)

MERGE /*+ PARALLEL( CPF, 4 ) */
INTO CUSTOMER_PRODUCT_FACT CPF
USING( SELECT /*+ PARALLEL( CPI, 4 ) */
END_DATE
,LATEST_VERS_IND
,RECORD_DELETE_IND
,DWH_UPDATE_DATE
,PROD_AD_TYPE_VERS_DATE
,CUST_PARTPNT_ID
FROM I_PR_CUST_PROD_ISSUE )CPI
ON (CPI.CUST_PROD_ISSUE_VERS_DATE = CPF.CUSTOMER_PRODUCT_VERS_DATE
And CPI.CUST_PARTPNT_ID = CPF.DW_CUST_PARTPNT_ID)

WHEN MATCHED THEN UPDATE SET
CPF.DATA_MART_END_DATE = CPI.END_DATE

,CPF.LATEST_VERSION_IND = CPI.LATEST_VERS_IND

,CPF.RECORD_DELETE_IND = CPI.RECORD_DELETE_IND

,CPF.DWH_UPDATE_DATE = CPI.DWH_UPDATE_DATE;

delete I_PR_CUST_PROD_ISSUE
where (CUST_PROD_ISSUE_VERS_DATE, CUST_PARTPNT_ID) in
(select CPF.CUSTOMER_PRODUCT_VERS_DATE
,CPF.DW_CUST_PARTPNT_ID
from CUSTOMER_PRODUCT_FACT CPF
,I_PR_CUST_PROD_ISSUE CPI
Where CPI.CUST_PROD_ISSUE_VERS_DATE = CPF.CUSTOMER_PRODUCT_VERS_DATE
and CPI.CUST_PARTPNT_ID = CPF.DW_CUST_PARTPNT_ID);
COMMIT;
/


when running the following code.

Could you please help me in finding out how to fix this code.

Cheers
Re: PLS-00103: Encountered the symbol "end-of-file" [message #134471 is a reply to message #134423] Thu, 25 August 2005 02:23 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
For starters, you need to end that comment after the PURPOSE: line with */

Also, you need a line with end; after the commit.
Previous Topic: Database user last accessed
Next Topic: Forall statement in 8i
Goto Forum:
  


Current Time: Mon Apr 21 08:00:38 CDT 2014

Total time taken to generate the page: 0.11236 seconds