CREATE FUNCTION qc_pgmsrinitscale($project int) returns float (10,2)
begin
    declare scale float (10,2) default 0;
    declare inited int default 0;
    select qc_cminited($project, 'SRS') into inited;
    IF inited = 1 THEN
    select qc_initscale($project, 'SRS','storyEst') into scale ;
    return scale ;
    ELSE 
    return 0;
    END IF;
end