Ignore:
Timestamp:
07/24/19 00:06:33 (5 years ago)
Author:
Daniela Dorner
Message:
added values for new periods up to 95, fixed option doupdate
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Tools/fill_r750.sh

    r19496 r19567  
    44sqlpw=/home/$USER/.mysql.pw.op
    55dbname=factdata
     6#doupdate=92
    67
    78query="SELECT Max(fPeriod) FROM RunInfo WHERE NOT ISNULL(fR750Cor)"
     
    1213pmaxref=`mysql --defaults-file=$sqlpw -s -e "$query" `
    1314echo "fR750Ref is already filled up to P"$pmaxref
     15
     16if [ "$doupdate" == "" ]
     17then
     18   numstart=$pmaxref
     19else
     20   numstart=$doupdate
     21fi
    1422
    1523
     
    2634query=$query" fR750Cor=round(fNumThreshold750/("$min")/("$cor"),2) "
    2735query=$query" WHERE fRunTypeKey=1 AND NOT (("$min")/("$cor"))=0 "
    28 query=$query" AND fPeriod>="$pmaxcor
     36query=$query" AND fPeriod>="$numstart
    2937echo $query
    3038mysql --defaults-file=$sqlpw -s -e "$query"
     
    123131       251.9 #90
    124132       249.4 #91
    125        240.0 #92 (current period)
     133       241.8 #92
     134       244.3 #93
     135       240.9 #94
     136       240.1 #95
    126137       )
    127138if [ ${#rates[@]} -lt $pmaxref ]
    128139then
    129140   ${#rates[@]}" "$pmaxref
     141   "No new reference values available ("$pmaxref")"
    130142   exit
    131143fi
    132 
    133 if [ "$doupdate" == "yes" ]
    134 then
    135    numstart=0
    136 else
    137    numstart=$pmaxref
    138 fi
    139144
    140145# fill reference values
    141146echo ""
    142147echo "Filling the reference values for the corrected R750 for "${#rates[@]}" periods to the DB..."
     148echo "  Starting from period "$numstart
    143149for (( i=$numstart; i < ${#rates[@]} ; i++))
    144150do
Note: See TracChangeset for help on using the changeset viewer.