Advertisement
Advertisement
| 08.19.2008 at 07:07PM PDT, ID: 23661807 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: |
-- Function: mf_finalize_run(integer, integer, character varying, integer, integer)
-- DROP FUNCTION mf_finalize_run(integer, integer, character varying, integer, integer);
CREATE OR REPLACE FUNCTION mf_finalize_run(integer, integer, character varying, integer, integer)
RETURNS integer AS
'
declare
ijob_id alias for $1;
iset_id alias for $2;
svgroup alias for $3;
iotype alias for $4;
iruntype_id alias for $5;
begin
-- Check that we have valid arguments
if (ijob_id is null) or (iset_id is null) or (svgroup is null) or (iotype is null) or (iruntype_id is null) then
raise exception ''None of the arguments can be null'';
end if;
-- Make the run available
update run_u set status = ''available''
where vgroup = ''svgroup'' and job_id = ijob_id and runtype_id = iruntype_id;
-- Link the runlink to the set
update runlink_u set id_val = iset_id
where tbl_otype = iotype and vgroup = ''svgroup'' and id in (
select rl.id from run r
inner join runlink rl on r.id=rl.run_id
where rl.vgroup = ''svgroup'' and r.job_id = ijob_id and rl.tbl_otype = iotype
);
-- Time stamp the run
update run_u set finish=now()
where job_id = ijob_id and runtype_id = iruntype_id and job_vgroup = ''svgroup'';
update run_u set failed=false
where job_id = ijob_id and runtype_id = iruntype_id and job_vgroup = ''svgroup'';
-- Mark run as finished
update run_u set status = ''finished''
where job_id = ijob_id and runtype_id = iruntype_id and job_vgroup = ''svgroup'';
return 1;
end;
'
LANGUAGE 'plpgsql' VOLATILE;
|