The following lines contain the word 'select', 'insert', 'update' or 'delete':
p_pcategory_flag IN VARCHAR2, -- to know if product category is selected or not.
p_rtype_flag IN VARCHAR2, -- to know if repair type is selected or not.
p_view_by IN VARCHAR2,
p_dim_bmap IN NUMBER,
x_mv_type OUT NOCOPY VARCHAR2,
x_mv OUT NOCOPY VARCHAR2) ;
l_bucket_selected_flag VARCHAR2(1);
l_bucket_selected_flag := 'N';
l_bucket_selected_flag := 'Y';
,p_bucket_flag => l_bucket_selected_flag
,x_custom_output => x_custom_output
,x_where_clause => l_additional_where_clause);
IF ( p_pcategory_flag = 'Y' ) THEN -- to check if product category is selected
x_mv_type := 'INLINE';
IF (bitand(p_dim_bmap,16) = 16 OR p_pcategory_flag = 'Y' ) THEN -- for checking if item is selected or it is in view by
x_mv := x_mv || ' ISC_DR_BKLG_01_MV';
IF (bitand(p_dim_bmap,16) = 16 OR p_pcategory_flag = 'Y' ) THEN -- for checking if item is selected or it is in view by
x_mv_type := 'BASE';
IF (bitand(p_dim_bmap,16) = 16 OR p_pcategory_flag = 'Y' ) THEN -- for checking if item is selected or it is in view by
x_mv := x_mv || ' ISC_DR_COSTS_01_MV';
IF (bitand(p_dim_bmap,16) = 16 OR p_pcategory_flag = 'Y' ) THEN -- for checking if item is selected or it is in view by
x_mv := x_mv || ' ISC_DR_CHARGES_01_MV';
IF (bitand(p_dim_bmap,16) = 16 OR p_pcategory_flag = 'Y' ) THEN -- for checking if item is selected or it is in view by
x_mv := x_mv || ' ISC_DR_MRGN_01_V';
IF (bitand(p_dim_bmap,16) = 16 OR p_pcategory_flag = 'Y' ) THEN -- for checking if item is selected or it is in view by
x_mv := x_mv || ' ISC_DR_MTTR_01_MV';
IF(l_parameter_id = '-1' ) THEN -- past due is selected
x_where_clause := x_where_clause || ' and fact.past_due_flag = ''Y'' ';
ELSIF(l_parameter_id = '9999' ) THEN -- Not promised is selected
x_where_clause := x_where_clause || ' and fact.promise_date is null ';
FUNCTION GET_VIEWBY_SELECT_CLAUSE (p_viewby IN VARCHAR2)
RETURN VARCHAR2
IS
l_viewby_sel VARCHAR2(200);
END get_viewby_select_clause;