Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Dbfeeds Project)

Dbfeeds Project)

Ratings: (0)|Views: 15|Likes:
Published by api-26304852

More info:

Published by: api-26304852 on Oct 19, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

CREATE TMP PARTITION(SP used in s_start_process)
FUNCTIONF_CREATE_TMP_PARTITION (pPrcProcessIdINTEGER
,pTableNameV ARCH A R 2
) RETURNINTEGER IS
lSqlStatementVARCHAR2(800);
BEGIN
IFpPrcProcessId =0 THEN
RAISE_APPLICATION_ERROR( \u00ad20011 , 'INTERNAL_ERROR : Wrong input
parameter: PrcProcessId='||pPrcProcessId, TRUE );
ELSE
lSqlStatement:= 'ALTER TABLE '||pTableName || ' ADD PARTITION
PROCESS_'||pPrcProcessId
|| ' VALUES ('||pPrcProcessId||')';
END IF;
EXECUTE IMMEDIATElSqlStatement;
RETURN1;
EXCEPTION
WHENOTHERS THEN
RAISE_APPLICATION_ERROR( \u00ad20011 , 'INTERNAL_ERROR : '||SQLCODE
||': '||SQLERRM , TRUE );
ENDF_CREATE_TMP_PARTITION;
GET PROCESSID(SP used in s_start_process)
FUNCTIONF_GET_PROCESS_ID(pTypeV ARCH A R 2) RETURNINTEGER IS
lPrcProcessIdINTEGER;
BEGIN
IFupper(pType) ='CURRENT' THEN
SELECTSEQ_GW_PROCESS_ID.CURRVAL INTOlPrcProcessId FROMDUAL;
ELSE
SELECTSEQ_GW_PROCESS_ID.NEXTVAL INTOlPrcProcessId FROMDUAL;
END IF;
RETURNlPrcProcessId;
EXCEPTION
WHENOTHERS THEN
RAISE_APPLICATION_ERROR( \u00ad20011 , 'INTERNAL_ERROR : '||SQLCODE
||': '||SQLERRM , TRUE );
END;
GET MESSAGEID
FUNCTIONF_GET_MESSAGE_ID (pTypeV ARCH A R 2) RETURNINTEGER IS
lMssgIdINTEGER;
BEGIN
IFupper(pType) ='CURRENT' THEN
SELECTSEQ_GW_MESSAGE.CURRVAL INTOlMssgId FROMDUAL;
ELSE
SELECTSEQ_GW_MESSAGE.NEXTVAL INTOlMssgId FROMDUAL;
END IF;
RETURNlMssgId;
EXCEPTION
WHENOTHERS THEN
RAISE_APPLICATION_ERROR( \u00ad20011 , 'INTERNAL_ERROR : '||SQLCODE
||': '||SQLERRM , TRUE );
END;
STORE TMP PARTITION DATA
FUNCTIONF _ STO R E _ T M P _ PART I T I O N _DATA (
pPrcProcessIdINTEGER
,pTableNameV ARCH A R 2
) RETURNINTEGER IS
lSystemIdINTEGER;
lInterfaceIdINTEGER;
lTemplateIdINTEGER;
lSqlStatementVARCHAR2(800);
BEGIN
SELECTSYST E M _ I D,INTERFACE_ID,TEMPL ATE_ID INTOl Sys te m I d,
lInterfaceId, lTemplateId
FROMT_GW_PRC_PROCESS WHEREPRC_PROCESS_ID=pPrcProcessId;
lSqlStatement:= 'INSERT INTO T_GW_ARC_'||lSystemId||'_'||
lInterfaceId||'_'||lTemplateId||' SELECT * FROM '||pTableName||' WHERE
PRC_PROCESS_ID = '||pPrcProcessId;
\u00ad\u00ad Commented out for the TEST purposes
\u00ad\u00ad EXECUTE IMMEDIATE lSqlStatement;
return1;
\u00ad\u00ad RETURN F_DROP_TMP_PARTITION (pPrcProcessId, pTableName );
EXCEPTION
WHENOTHERS THEN
RAISE_APPLICATION_ERROR( \u00ad20011 , 'INTERNAL_ERROR : '||SQLCODE
||': '||SQLERRM , TRUE );
END;
wf_Start_FeedName
m_StartProcess:
m_CreateFeedParamFiles

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->