How to check whether table exists in swl
I am trying something like this
create or replace
PROCEDURE P
(
d_date DATE
)
as
IF(COMPASS_REPORTER.GL_DATA EXISTS)
THEN
SELECT GL_DATE FROM COMPASS_REPORTER.GL_DATE
ALM_SP_GL_001_TBL;
ALM_SP_GL_001_TBL with gl_date=D_DATE+1;
ELSE
ALM_SP_GL_001_TBL;
ALM_SP_GL_001_TBL WITH gl_date=D_DATE;
END IF;
END P;
I am trying below this 1 st table compass_reporter.gl_data 2 nd table
compass2.gl_data
if( 1st table exists) then select date from 1st table and call a
(procedure) how to do this?
No comments:
Post a Comment