Commit 24f0ad97 authored by caluka's avatar caluka

sql updated to add get_cycle_criteria() function in Physical Count Scheduler


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95798 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 49b1fb5c
......@@ -35,3 +35,37 @@ end;
return as_anal_class;
end;
---Added by chandrashekar on 06-08-2014 start
create or replace function get_cycle_criteria(as_site_code char, as_item_code char)
return char is as_cyclecriteria char ;
begin
begin
select cycle_criteria into as_cyclecriteria
from siteitem
where site_code = as_site_code
and item_code = as_item_code;
if trim(as_cyclecriteria) is null then
select cycle_criteria into as_cyclecriteria
from item
where item_code = as_item_code;
return as_cyclecriteria;
else
return as_cyclecriteria;
end if;
exception
when no_data_found then
select cycle_criteria into as_cyclecriteria
from item
where item_code = as_item_code;
return as_cyclecriteria;
end;
return as_cyclecriteria;
end;
---End Added by chandrashekar on 06-08-2014
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment