Average Score Function

Hello.
I have two things I need to do but I'm not sure how. These problems come up in my EVALUATION_RESULTS table. The first thing I need to do is create a formula for the primary key EVALUATION_ID. I need to do this so that it is the EMPLOYEE_NUMBER followed by EMPLOYER_NUMBER followed by EVALUATION_ID. For instance, if the employee being evaluated has the number 10000, the employer has the number 1000, and the evaluation ID is 100, the evaluation number should automatically be 100001000100. How can I have this be created automatically after the user completes a form?
The second issue is: I need to create a function in the EVALUATION_RESULTS table that takes an average of four scores that are input in the form. So it will take (SCORE1+SCORE2+SCORE3+SCORE4)/4. How can I implement this so that the user enters the four scores, submits the form, and the AVERAGE_SCORE is added to the table.
Thanks in advance for the help.
Edited by: DanDan Sc on Jan 13, 2013 3:40 PM

Hi Dan,
your two requirements are probably not good ideas from a relational design point of view.
I have two things I need to do but I'm not sure how. These problems come up in my EVALUATION_RESULTS table. The first thing I need to do is create a formula for the primary key EVALUATION_ID. I need to do this so that it is the EMPLOYEE_NUMBER followed by EMPLOYER_NUMBER followed by EVALUATION_ID. For instance, if the employee being evaluated has the number 10000, the employer has the number 1000, and the evaluation ID is 100, the evaluation number should automatically be 100001000100. How can I have this be created automatically after the user completes a form? Doing this is committing the error of overloading. This is where a single attribute contains information for more than one attribute. From a relational design point of view, the first thing you should be identifying from your list of attributes is the natural keys. In your case it may simply be the original evaluation id (100). If this is not unique, for example more than one employee or employer may share an evaluation id, then the natural key may be a combination of some or all of the attributes you have noted. In this case the natural key would be a combination of those attributes in what is called a composite key. From an implementation point of view, it may be quite acceptable to then create your Primary Key as a combination of those columns in a composite PK. Another implementation issue is that composite PK's can become unweildy to deal with, especially if they have to be referred to in different entities as Foreign Keys. In this case, you can change the composite PK to a Unique Key and create a single part PK which will be a number that is generated from a database object called a sequence. This is generally called an artificial key. If for some business reason you need to refer your original PK in the format you suggested, as in reports or business receipts, then is is a simple exercise to retrieve it from the database as you require it.
The second issue is: I need to create a function in the EVALUATION_RESULTS table that takes an average of four scores that are input in the form. So it will take (SCORE1+SCORE2+SCORE3+SCORE4)/4. How can I implement this so that the user enters the four scores, submits the form, and the AVERAGE_SCORE is added to the table.Another principle of relational design is that you don't store anything in the database that can be derived from the existing data. Things like your average score should be calculated on the fly when ever your data is presented to the user in forms or reports.
Regards
Andre

Similar Messages

  • How score() function works in HANA fuzzy search

    Hi, i am confused by the score() returned value when i use this in fuzzy search in HANA
    CREATE COLUMN TABLE test_similar_calculation_mode
    ( id INTEGER PRIMARY KEY, s text);
    INSERT INTO test_similar_calculation_mode VALUES ('1','stringg');
    INSERT INTO test_similar_calculation_mode VALUES ('2','string theory');
    INSERT INTO test_similar_calculation_mode VALUES ('3','this is a very very very long string');
    INSERT INTO test_similar_calculation_mode VALUES ('4','this is another very long string');
    SELECT TO_INT(SCORE()*100)/100 AS score, id, s FROM test_similar_calculation_mode WHERE CONTAINS(s, 'theory', FUZZY(0.9, 'similarCalculationMode=compare')) ORDER BY score DESC;
    the returned list is just as below
    SCORE      ID      S
    0.84            2       string theory
    why i assign 0.9 as threshold in fuzzy function while this line with score 0.84 also be returned.
    from my understanding, the S field is text data type, so the string actually is divided into seperate word list, so the score should be 1.0, is it right?
    any hints is very appreciate,thanks

    Hi William,
    By default the score() function returns a TF/IDF score for text data types.
    To get back the fuzzy score, you have to use the search option 'textSearch=compare' (or 'ts=compare'). Without other options, this gives an average score of all tokens ('string' and 'theory') and you get a score of 0.7 as a result.
    To ignore the additional token 'string' in the database, you have to specify another option that tells the score function to use the tokens from the user input only ('cnmt=input').
    So you should use
    TO_INT(SCORE()*100)/100 AS score, id, s
    FROM test_similar_calculation_mode
    WHERE CONTAINS(s, 'theory', FUZZY(0.9, 'scm=compare, ts=compare, cnmt=input'))
    ORDER BY score DESC;
    to get the expected results.
    Regards,
    Jörg

  • Expected type [STRING] found [MEMBER] ([Average]) in function [@ISACCTYPE]

    Hi
    We've upgraded from 11.1.1.0 to 11.1.2.1.
    The following member formula worked previously:
    if(@ismbr(YearTotal));
    +     Jun;+
    ELSEIF(@ISACCTYPE(Average));
    +     @AVGRANGE(SKIPNONE,@CurrMbr(Measures)->Month,@ILSIBLINGS(@CurrMbr(Period)));+
    ELSE
    +     @ACCUM(Month,Jul:Jun);+
    Endif;
    Now get the following error:
    +Error(1200354) - Error compiling formula for [YTD] (line 3): expected type [STRING] found [MEMBER] ([Average]) in function [@ISACCTYPE]+
    There is no member or member alias called 'Average' (I did a search).
    I refered to this forum item, but no solution was provided: @ISACCTYPE formula error
    Your assistance is appreciated.
    Cheers

    Hold on!
    I thought to query the SQL repository and got some help from this dodgy blog:
    http://camerons-blog-for-essbase-hackers.blogspot.com.au/2011/07/stupid-planning-queries-3-accounts.html
    For reference purposes, here's what I ran:
    select               
                   hspo.object_name
    from               hsp_object     hspo
    INNER JOIN          HSP_ACCOUNT     hspa     on hspo.object_id = hspa.ACCOUNT_ID
    where               1=1
    and               hspo.OBJECT_TYPE = '32' --Account dimension
    and               hspa.TIME_BALANCE = 3 --Time Balance = Average
    TIME_BALANCE
    WHEN 0 THEN 'None'
    WHEN 1 THEN 'First'
    WHEN 2 THEN 'Last'
    WHEN 3 THEN 'Average'
    ELSE ''
    Edited by: user964802 on Jan 17, 2013 11:19 AM
    Edited by: user964802 on Jan 17, 2013 12:07 PM

  • Pb score function - DRG-50901

    Hi all,
    I get an error DRG-50901 :text query parser syntax error on line 1, column 1
    when i use the score function
    table DOCUMENT :
    -FILE_ID
    -FILE_NAME
    -BLOB_CONTENT BLOB
    -FILE_TYPE
    -FILE_SIZE
    the index code :
    CREATE INDEX DOCUMENT_IDX ON DOCUMENT
    (BLOB_CONTENT)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('FILTER ctxsys.auto_filter SYNC (ON COMMIT)');
    So the first query works well but the second does not !
    1)
    SELECT d.file_name
    FROM document d
    WHERE (contains (d.blob_content, '%' || TEXT_VALUE || '%', 1) > 0)
    2)
    SELECT d.file_name, score(1) as relevance
    FROM document d
    WHERE (contains (d.blob_content, '%' || TEXT_VALUE || '%', 1) > 0)
    Can anybody help me to solve it?
    Regards,
    Gregory

    I have not seen this problem before. Can you post a complete example and also include your release number?
    Faisal

  • High score functionality via call to external server

    I have just packaged an existing Flash game as a test and literally just packaged it without making any changes whatsoever. The game included a top 100 score board which is populated by calling an asp page on an external server that returns xml data.
    I was most surprised that the high score functionality all worked when I tested the game on my iPhone i.e it displays the scores. I haven't tested submitting one yet though.
    I therefore wondered if this is allowed and if so is there any reason why this should be avoided. I have read there is something called Open Feint that allows you to do high scores.
    Any advice much appreciated.
    Thanks
    Paul

    Hi,
    where exactly is the FM crashing and why? Did you debug? Is it occuring at
    CALL FUNCTION 'FTP_CONNECT' DESTINATION RFC_DESTINATION
         EXPORTING USER = USER PWD = PASSWORD ACCT = ACCOUNT HOST = HOST
                   TRACE = FTP_TRACE GUSER = GATEWAY_USER
                   GPWD = GATEWAY_PASSWORD GHOST = GATEWAY_HOST
         IMPORTING HANDLE = HANDLE ERROR = CERROR
         EXCEPTIONS SYSTEM_FAILURE = 1 COMMUNICATION_FAILURE = 2.
    or earlier?
    Try tracing with ST01, one time with the way it works, and another time out of the WebDynpro where it crashes, then compare the logs.
    regards, Lukas

  • Audio to score function?

    Watched the Scott Wilkie Logic Pro tutorial and was trying to replace live drum sounds with the audio to score function. I may have gotten some of the steps wrong. I created a new instrument track and then went to the audio to score function and adjusted the velocity threshold. I processed the audio but I don't know if it processed. Now that I think of it I didn't see the midi score. Have anyone had any success doing this or know the steps. What window did Wilkie constrain the notes to a single pitch in? I guess he was doing it so fast.
    Thanks
    Greeneye

    put an empty midi track under the audio trak yor are trying to process. someties the midi track goes under the audio track you just converted, try dragging the aduio up/down to an adjacent empty track.. the midi track will be there. by fooling around with the levels, its fairly easy to create a replacement drum track. Use transform function to move all the midi notes to the proper trigger note you want.. Those will often end up on several different pitchs,
    once you get used to it, it is a very fast way to replace drum notes. it takes a little while, depending on length, and you will see a 'count down list' of notes to process.

  • **** snare flams using audio to score function!

    Hello,
    I've been using audio to score function to trigger snare samples from the ex24 to mix in with a recorded audio snare track.
    The problem is however the midi notes don't always exactly lock in with the audio resulting in random flams that I have to zoom in and move.
    Have I got the settings wrong for this? (I think I used the preset for drums-fast)
    Not sure if there is something I'm doing wrong, possibly the sensitivity?
    Thanks!

    You've got to play with the settings, and yes, I get flams too. You have to zoom in, and clean up the audio to score process. It's good, but not perfect.
    Superior has released a program called drum tracker , it will generate a midi file from an audio drumtrack file. It uses a series of filters to better pick out kik, hats, etc. It's better than Logic's, but Logic's function will still fill the bill (without having to spend extra $$$.
    In fact, you can set up a similar EQ filter, to help Logic improve it's recognition of kick, snares, hats, etc. Create a eq for each drum you want to detect. If you were replacing drums all day long, the Superior drum tracker would be a good investment. If you do it only occassionally, stick to Logic's 'audio to score' feature .

  • Viewing limits & average score on dvd

    does anyone know if dvd studio pro 4 has the capability of limiting the number of times a dvd can be viewed once it's burned. for example, via a script can you set a viewing limit of say 25 times and on the 26th time the dvd will not be useable?
    also i'm creating an interactive test and would like to know if studio pro will be able to provide avg scores at the end of the test session via a script. plz advise.

    You can limit the number times a track or menu is viewed by adding a value to a GPRM each time that portion of the disc is accessed. Another script can be used to check that value. Once it reaches 25 it can no longer allow that portion of the disc to played. The problem is that registers are re-set once you eject a disc so its only possible once a disc starts.
    You can determine averages of scores with scripts as well. Lets say you have 10 questions. Each correct answer adds a value to a GPRM. An incorrect answer add NO value. So after the test session you can determine the avg score with a script like:
    1. go to 12 if GPRM 0=0
    2 go to 13 if GPRM 0=1
    3 go to 14 if GPRM 0=2
    4 go to 15 if GPRM 0=3
    5 go to 16 if GPRM 0=4
    6 go to 17 if GPRM 0=5
    7 go to 18 if GPRM 0=6
    8 go to 19 if GPRM 0=7
    9 go to 20 if GPRM 0=8
    10 go to 21 if GPRM 0=9
    11 go to 22 if GPRM 0=10
    12 Jump Menu "no correct answers"
    13 Jump Menu "10% correct"
    14 Jump Menu "20% correct"
    15 Jump Menu "30% correct"
    16 Jump Menu "40% correct"
    17 Jump Menu "50% correct"
    18 Jump Menu "60% correct"
    19 Jump Menu "70% correct"
    20 Jump Menu "80% correct"
    21 Jump Menu "90% correct"
    22 Jump Menu "100% correct"
    Remember you'll need to design different menus for each percentage correct reading. You can also use Compare option ( "<">=", ect) to determine your percentages. There are different ways to achieve the same thing in scripting - The script above is just how I think
    Also Hal Mclean does a much better job at explaining these things so I hope he comes around tonight.

  • Inventory Controlling - Get history moving average price function - Urgent

    Dear Experts,
    Currently I have an issue that I want to calculate material history value at storage location level for each month. I tried to get history stock quantity and value from table S031, stock quantity is correct. But stock value (goods receive value minus goods issue value in table S031) is not correct.
    Client requests the resulet should be same as transaction code MC.9 (valuation selection - standard). But what the result I got from table S031 is the value that without disctribution.  Currently I do not know how MC.9 calculate stock value.
    Does any expert know if there is a funciton that can get history moving average price. I may use this price multiply history stock to get history value. Thanks
    Best Regards
    Angela

    Hello,
      Moving average cost history is available in MBEWH-VERPR.
    Thanks,
    Venu

  • Custom Score Function

    Experts,
    I want to perform a search on approx 200k records, all of 255 characters or less. For example, a user might enter "red hERring" and I'd like returned "Red herring", 100 for the term and score if an exact match is found. If a slight discrepancy say "herrings, red" is returned the score should be less, 0.8 for example. Further differences, such as "red hairing" should be further reduced to 0.55 (for example).
    To further complicate matters, I'd like to use the Thesaurus so that "red fish" would return a relatively high score of 0.75 or so.
    Is this available or would it need to be custom built?
    Many thanks in advance all!
    Phil

    Here is a simplified working example of what I think you are trying to do:
    scott@ORA92> CREATE TABLE customers
      2    (customer_id NUMBER,
      3       first_name  VARCHAR2(15),
      4       last_name   VARCHAR2(15),
      5       dummy         VARCHAR2(1),
      6       CONSTRAINT  customers_pk PRIMARY KEY (customer_id))
      7  /
    Table created.
    scott@ORA92> CREATE TABLE addresses
      2    (customer_id NUMBER,
      3       street         VARCHAR2(15),
      4       city         VARCHAR2(15),
      5       state         VARCHAR2(2),
      6       CONSTRAINT  addresses_fk FOREIGN KEY (customer_id)
      7                REFERENCES customers (customer_id))
      8  /
    Table created.
    scott@ORA92> CONNECT CTXSYS/ctxsys_password
    Connected.
    scott@ORA92> @ LOGIN
    scott@ORA92> SET ECHO OFF
    GLOBAL_NAME
    ctxsys@ORA92
    ctxsys@ORA92> CREATE OR REPLACE PROCEDURE concat_cols
      2    (p_rowid IN     ROWID,
      3       p_clob     IN OUT CLOB)
      4  AS
      5    v_clob            CLOB;
      6  BEGIN
      7    FOR c1 IN
      8        (SELECT customer_id, first_name || ' ' || last_name AS data
      9         FROM      scott.customers
    10         WHERE  ROWID = p_rowid)
    11    LOOP
    12        v_clob := v_clob || c1.data;
    13        FOR c2 IN
    14          (SELECT ' ' || street || ' ' || city || ' ' || state AS data
    15           FROM   scott.addresses a
    16           WHERE  a.customer_id = c1.customer_id)
    17        LOOP
    18          v_clob := v_clob || c2.data;
    19        END LOOP;
    20    END LOOP;
    21    p_clob := v_clob;
    22  END concat_cols;
    23  /
    Procedure created.
    ctxsys@ORA92> SHOW ERRORS
    No errors.
    ctxsys@ORA92> GRANT EXECUTE ON concat_cols TO scott
      2  /
    Grant succeeded.
    ctxsys@ORA92> CONNECT scott/tiger
    Connected.
    ctxsys@ORA92> @ LOGIN
    ctxsys@ORA92> SET ECHO OFF
    GLOBAL_NAME
    scott@ORA92
    scott@ORA92> BEGIN
      2    CTX_DDL.CREATE_PREFERENCE ('concat_cols_datastore', 'USER_DATASTORE');
      3    CTX_DDL.SET_ATTRIBUTE ('concat_cols_datastore', 'PROCEDURE', 'concat_cols');
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    scott@ORA92> CREATE INDEX customer_text_idx ON customers (dummy)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  PARAMETERS ('datastore concat_cols_datastore')
      4  /
    Index created.
    scott@ORA92> CREATE OR REPLACE TRIGGER taiud_customer
      2    AFTER INSERT OR DELETE OR UPDATE ON customers
      3  DECLARE
      4    v_job NUMBER;
      5  BEGIN
      6    IF DELETING THEN
      7        DBMS_JOB.SUBMIT
      8          (v_job,
      9           'ctx_ddl.optimize_index (''CUSTOMER_TEXT_IDX'',''FULL'');',
    10           SYSDATE);
    11    ELSE
    12        DBMS_JOB.SUBMIT
    13          (v_job,
    14           'ctx_ddl.sync_index (''CUSTOMER_TEXT_IDX'');',
    15           SYSDATE);
    16    END IF;
    17  END taiud_customer;
    18  /
    Trigger created.
    scott@ORA92> SHOW ERRORS
    No errors.
    scott@ORA92> INSERT ALL
      2  INTO customers VALUES (1, 'Bob', 'Smith', NULL)
      3  INTO customers VALUES (2, 'Bob', 'Jones', NULL)
      4  SELECT * FROM DUAL
      5  /
    2 rows created.
    scott@ORA92> INSERT ALL
      2  INTO addresses VALUES (1, 'Noplace', 'Nowhere', 'CA')
      3  INTO addresses VALUES (2, 'Smith St.', 'Somewhere', 'CA')
      4  SELECT * FROM DUAL
      5  /
    2 rows created.
    scott@ORA92> COMMIT
      2  /
    Commit complete.
    scott@ORA92> EXEC DBMS_LOCK.SLEEP (15)
    PL/SQL procedure successfully completed.
    scott@ORA92> SELECT token_text FROM dr$customer_text_idx$i
      2  /
    TOKEN_TEXT
    BOB
    CA
    JONES
    NOPLACE
    NOWHERE
    SMITH
    SOMEWHERE
    ST
    8 rows selected.
    scott@ORA92> VARIABLE g_words VARCHAR2(30)
    scott@ORA92> EXEC :g_words := 'Bob Smith'
    PL/SQL procedure successfully completed.
    scott@ORA92> SELECT   SCORE (1) * 3 + SCORE (2) * 2 + SCORE (3) * 1 AS score,
      2             c.first_name, c.last_name, a.street, a.city
      3  FROM     customers c, addresses a,
      4             (SELECT     LTRIM (RTRIM (REPLACE (REPLACE (REPLACE (:g_words,
      5                 '    ', ' '), '   ', ' '), '  ', ' '))) AS words
      6              FROM     DUAL) t2
      7  WHERE    c.customer_id = a.customer_id
      8  AND      (CONTAINS (C.dummy, t2.words, 1) > 0
      9  OR       CONTAINS (C.dummy,
    10                 'NEAR(($' || REPLACE (t2.words, ' ', ',$') || '),1)',
    11                 2) > 0
    12  OR       CONTAINS (c.dummy,
    13                 '!' || REPLACE (t2.words, ' ', ' AND !'), 3) > 0)
    14  ORDER BY 1 DESC
    15  /
         SCORE FIRST_NAME      LAST_NAME       STREET          CITY
            40 Bob             Smith           Noplace         Nowhere
            31 Bob             Jones           Smith St.       Somewhere
    scott@ORA92> UPDATE customers
      2  SET    last_name = 'Williams',
      3           dummy = dummy
      4  WHERE  last_name = 'Smith'
      5  /
    1 row updated.
    scott@ORA92> UPDATE customers
      2  SET    dummy = dummy
      3  WHERE  customer_id IN
      4           (SELECT customer_id
      5            FROM   addresses
      6            WHERE  city = 'Somewhere')
      7  /
    1 row updated.
    scott@ORA92> UPDATE addresses
      2  SET    city = 'Williams'
      3  WHERE  city = 'Somewhere'
      4  /
    1 row updated.
    scott@ORA92> COMMIT
      2  /
    Commit complete.
    scott@ORA92> EXEC DBMS_LOCK.SLEEP (15)
    PL/SQL procedure successfully completed.
    scott@ORA92> SELECT token_text FROM dr$customer_text_idx$i
      2  /
    TOKEN_TEXT
    BOB
    CA
    JONES
    NOPLACE
    NOWHERE
    SMITH
    SOMEWHERE
    ST
    BOB
    CA
    JONES
    NOPLACE
    NOWHERE
    SMITH
    ST
    WILLIAMS
    16 rows selected.
    scott@ORA92> VARIABLE g_words VARCHAR2(30)
    scott@ORA92> EXEC :g_words := 'Bob Williams'
    PL/SQL procedure successfully completed.
    scott@ORA92> SELECT   SCORE (1) * 3 + SCORE (2) * 2 + SCORE (3) * 1 AS score,
      2             c.first_name, c.last_name, a.street, a.city
      3  FROM     customers c, addresses a,
      4             (SELECT     LTRIM (RTRIM (REPLACE (REPLACE (REPLACE (:g_words,
      5                 '    ', ' '), '   ', ' '), '  ', ' '))) AS words
      6              FROM     DUAL) t2
      7  WHERE    c.customer_id = a.customer_id
      8  AND      (CONTAINS (C.dummy, t2.words, 1) > 0
      9  OR       CONTAINS (C.dummy,
    10                 'NEAR(($' || REPLACE (t2.words, ' ', ',$') || '),1)',
    11                 2) > 0
    12  OR       CONTAINS (c.dummy,
    13                 '!' || REPLACE (t2.words, ' ', ' AND !'), 3) > 0)
    14  ORDER BY 1 DESC
    15  /
         SCORE FIRST_NAME      LAST_NAME       STREET          CITY
            43 Bob             Williams        Noplace         Nowhere
             3 Bob             Jones           Smith St.       Williams
    scott@ORA92>

  • How Fuzzy score and Score() function works in HANA?

    Hi,
    I read fuzzy developer guide of HANA, but i am not getting how HANA calculate score() and fuzzy score?
    As per developer guide, Score() is calculate using TF/IDF, and I also try to calculate TF/IDF as per WIKI page, but it gives different values. and Score() value is changed as per x value of fuzzy(x) .
    See example
    select score() as sc, *
    from COMPANIES2
    where contains(Companyname,'IBM',fuzzy(0.7))
    it returns
    SC;                             ID; COMPANYNAME;  CONTACT
    0.7599999904632568;   6;  IBM Corp;               M. Master
    and for
    select score() as sc, *
    from COMPANIES2
    where contains(Companyname,'IBM',fuzzy(0.2))
    it return
    SC;                               ID;  COMPANYNAME;       CONTACT
    0.16945946216583252;   2;   SAP in Walldorf Corp;  Master Mister
    0.8392000198364258;     6;   IBM Corp;                   M. Master
    and table content of Companies2 is
    ID; Companyname;           contact
    1;  SAP Corp;                   Mister Master
    2;  SAP in Walldorf Corp;   Master Mister
    3;  ASAP;                         Nister Naster
    4;  ASAP Corp;                 Mixter Maxter
    5;  BSAP orp;                   Imster Marter
    6;  IBM Corp;                    M. Master
    Please provide any formula or algorithm for above.
    Thanks,
    Somnath A. Kadam

    Hi Somnath,
    It seems that the column "Companyname" has data type "SHORTTEXT" and here is the quote from SAP HANA Developer Guide Ch. 10.2.4.8 (p659)
    "Text types support a more sophisticated kind of fuzzy search. Texts are tokenized (split into terms), and the fuzzy comparison is performed term by term.
    When searching with 'SAP' for example, a record like 'SAP Deutschland AG & Co. KG' gets a high score, because the term 'SAP' exists in both texts. A record like 'SAPPHIRE NOW Orlando' gets a lower score, because 'SAP' is just a part of the longer term 'SAPPHIRE' (3 of 8 characters match)."
    So for text columns the score calculation is much more complex than tf-idf.
    As for the different fuzzy score, there is an explanation in the FAQ section ( Ch. 10.2.4.14, p736 "Is the score between request and result always stable for TEXT columns?")
    Basically, for each token, its similarity score will be used to calculate the overall result only if it is higher than the threshold given in fuzzy(). Any token with a lesser similarity score will be excluded. Therefore, slight change in the threshold may influence the overall score greatly.
    Here is an example.
    I added id 7 "SAP ASAP" to the data you used.
    Note that the similarity score between "ASAP" and "BSAP" is slightly over 0.74 and similarity score between "SAP" and "BSAP" is 0.75:
    For
        select score() as sc, * from COMPANIES2  where contains(COMPANYNAME,'BSAP',fuzzy(0.74))
    We get:
    <...omitted...>
    0.7474510073661804;    7;    SAP ASAP;        M. Master
    Now change the  threshold to 0.75 and the result is:
    <...omitted...>
    0.5588234663009644;    7;    SAP ASAP;        M. Master
    ID 7 now gets a lower score because "ASAP" is excluded and only "SAP" is used to calculate the overall result.
    As for tf-idf, it is used in the so-called freestyle search across multiple columns.
    An example from the same guide:
         select score() as sc, * from companies2 where contains((companyname,contact), 'IBM Master', FUZZY(0.7));
    Result:
    0.8103122115135193;    6;    IBM Corp;    M. Master
    Regards
    Roger Tao

  • How to sort a average in the interactive report

    I have a interactive report. The columns are candidate_name, reviewer_name, score.
    each reviewer will have a score for a candidate. There are many candidates. My boss wants to know which candidate get the highest average score. I build an interactive report.
    I can average the score for each candidate_name and break with this column. I don't know if we can sort the average score for each candidate_name column. If we can, how to do this.
    Thanks a lot!

    Not sure if you got an answer for this, but the only way I know how to do it would be to use an analytic function on the query so that the average of the scores is listed as a column. When you have that, then you can sort by it. As of ApEx 3.2.1, you will not be able to create this new column using the interactive reports "Compute" feature. You'll need to build it into the SQL.
    Shane.

  • BT Mobile - Problem with Erroneous Credit Score an...

    I have been a BT Customer for 35 years and have always paid my bills on time. I have a monthly direct debit for my landline and Broadband and have just added BT Mobile to my account. I have to say that I should have paid more attention when setting up BT Mobile online as it did flag through the process that there would be a cap of £50 spend outside the monthly plan and that roaming would be turned off. On receipt of the confirmation email on 2nd April this limit to my account was restated and was put down to my credit score. I called BT on the 2nd and was told that this was not a problem and the limits could be changed once the service had started. The service commenced on 8th April and on entering MYBT I am able to increase the monthly cap to £100 (not that i want or need to). However, the real issue I have is that I cannot activate Mobile Roaming. My account is flagged (Sorry, but you can’t use your phone abroad at the moment. You need to be a BT Mobile customer for six months first and have paid all your bills on time).
    I rang BT on 10th April to find out what the problem is and was told that it was my credit score and there was nothing that could be done to change what had been done. I was told that I would need to find out for myself what adverse information was held by Equifax who BT use. After paying £14.95 to Equifax for a full report and credit score I found that my credit score is 527 which is deemed to be excellent against the UK average score of 380, and there is absolutely no adverse information whatsoever which is of no surprise to me. So what on earth are BT looking at. I have tried in vein to get somebody in BT to check my file as there must be an error. I suspect that when I applied on line the process is automated and the system has made a mistake. Rather than investigate my case I am just being told nothing can be done to let me use my phone whilst abroad. After several hours on the phone to various people over a few days I have come up against a brick wall.
    Is there anyway a moderator could help me please. If I had known that I would encounter this I would not have signed up for BT Mobile and Ported my number which I would be loathe to loose.      

    it may well be nothing to do with your credit score, but more to do with bt internals
    ie: I purchased a new second hand car last year (December), my bank who i have been with for over 10 years, have a current loan with (that ends this year) and have had previous loan with, never been overdrawn, wages paid in each month and bills paid on time said I could not have a loan and if they did offer one it would be at a very high interest rate (i am still waiting to fine out from them why), even though I got a loan through another company at a very good deal, I upgraded my 3 accounts with EE from T-Mobile in December and January which all required a new credit check went through without issues (and they offered me another line on my contract on Sunday, saying that my credit rating is perfect) . My credit rating from experian when I checked (because of my bank) was Green and in Excellent condition.
    The only thing I know was 11 years ago I got in financial debt (the bank purchased the debt from another company, but I paid everything off by scrimping and scraping for a number of years) - it may be that they are still using against me, but every other company has said they find nothing wrong with my rating, but what I have heard is that they reset ratings every month, so you may be fine to get something on the 1st of the month, but if applied on the 2nd they would refuse it.

  • [Forum FAQ] How do I add an average line to series group on SQL Server Reporting Services column chart?

    Introduction
    In SQL Server Reporting Service (SSRS), you may need an average value on column chart.
    For the above chart, add an average score line to the chart, you can get which student’s score is larger than average score, and which student’s score is less than average score clearly. This document demonstrates how to add an average line to series groups
    on SSRS column chart.
    Solution
    To achieve this requirement, you can add another values to the chart, change the chart type to line chart. Set the value to average value of the series group and set the line to show only once by using expression. Please refer to the link below to see the
    detail steps.
    Click the chart to display the Chart Data pane.
    Add Score field to the Values area.
    Right-click the new inserted Score1 and select Change Chart Type. And then change chart type to line chart in the Select Chart Type window.
    Change the Category Group name to Subject. Here are the screenshot for you reference.
    Right-click the new inserted Score1 and select Series Properties.
    Click the expression button on the right of Value field textbox, type the expression below:
    =Avg(Fields!Score.Value,"Subject"))
    Click Visibility in the left pane, select “Show or hide based on an expression”, and type in the expression below:
    =IIF(Fields!Name.Value="Rancy",FALSE,TRUE)
    Name in the expression is one of the Students. Then only one line chart is be displayed by using this expression.
    Click Legend in the left pane, type Average_Score to the Custom legend text box.
    The report looks like below:
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • Best way to add a score to a score box and total it up.

    I am creating a game for children to make good food choices
    for breakfast, lunch, dinner, and snacks. I need to have the food
    choice add a value to a score box when clicked onto the plate and
    subtract the same amount when clicked off. So far, all I have been
    able to do is get the score to appear in the upper left hand
    corner. When I can get the pancakes working properly, I will be
    adding other foods which will do the same thing with different
    numbers. The total score cannot go over 100. I am attaching the .as
    code, but it is separate from the .fla and I'm not sure if I can
    upload the .fla here.

    That worked! Now, I have another problem I can't seem to
    figure out--when I add another food, berries, all it is doing is
    moving the pancakes and not itself! Here is the revised coding:
    package
    //import any class being used by this package
    import flash.display.MovieClip;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import flash.events.MouseEvent;
    public class MealGame extends MovieClip
    //altered version
    var offPlate:Boolean; //variable for food off the plate
    var gameScore:int = 0;
    public function MealGame()
    //Create a score field for the pancakes.
    var gameScoreField:TextField = new TextField();
    // set the position values
    gameScoreField.x = 445;
    gameScoreField.y = 530;
    //Show the score field
    addChild(gameScoreField);
    var tf:TextFormat = new TextFormat();
    var scoreBox:Object = getChildAt(numChildren-1);
    //scoreBox.x = 445;
    //scoreBox.y = 530;
    //Create a new instance of the meal class.
    var pancakes1:Pancakes = new Pancakes();
    var berries1:Berries = new Berries();
    //Display the food on this stage.
    this.addChild(pancakes1);
    this.addChild(berries1);
    //Position the food item.
    pancakes1.x = 11;
    pancakes1.y = 42;
    berries1.x = 211;
    berries1.y = 396;
    offPlate = true;
    //make the food item a button
    pancakes1.buttonMode = true;
    pancakes1.addEventListener(MouseEvent.CLICK, onClick);
    berries1.buttonMode = true;
    berries1.addEventListener(MouseEvent.CLICK, onClick);
    //toggle the food item to put on plate or off the plate
    //toggle adding to the score or removing from the score
    function onClick(event:MouseEvent):void
    if(offPlate)
    pancakes1.x = 119;
    pancakes1.y = 380;
    berries1.x = 515;
    berries1.y = 55;
    //add to score
    gameScore = gameScore + 50;
    gameScoreField.text = " " + String(gameScore);
    tf.font = "Arial";
    tf.bold = true;
    tf.color = 0x000000;
    tf.size = 32;
    //Take this text formatting object; apply it to the
    textfield
    gameScoreField.setTextFormat(tf);
    //toggle the offPlate value
    offPlate = !offPlate;
    else
    pancakes1.x = 11;
    pancakes1.y = 42;
    //berries1.x = 211;
    //berries1.y = 396;
    //remove from score
    gameScore = gameScore - 50;
    gameScoreField.text = " " + String(gameScore);
    tf.font = "Arial";
    tf.bold = true;
    tf.color = 0x000000;
    tf.size = 32;
    //tf.x = 426;
    //Take this text formatting object; apply it to the
    textfield
    gameScoreField.setTextFormat(tf);
    offPlate = !offPlate;
    }

Maybe you are looking for

  • Java.security.cert.CertificateException: Untrusted Cert Chain

    Hi all, While sending transaction to our supplier I am facing below error, Actually Our trading partner has given .p7b cert, I converted it into base 64 and i m using in b2b server. I am doing the same with all the suppliers but I am facing issue wit

  • Issues with Overlapping Symbols

    Hi, I've created an interactive guide on how a piece of scientific apparatus works using Edge Animate, but I've ran into a problem and I'm hoping the community might be able to help me. What I've Done So Far - Created flyout tooltips that animate as

  • How do we SPLIT Purchase Order in Order Recommendation Report

    Is there any way to SPLIT Purchase Order in Order Recommendation Report.

  • Assigned PR from MRP Run

    Hi everybody I've this problem. I've got a material with procurement type 'F', special procurement '30' and PD as MRP type. I created an inforecord and I flagged the vendor as regular vendor. I maintained the source list for the vendor and material w

  • Leading Zeroes are lost when convert from string to int

    What I'm trying to do is simple yet the solution has seemed difficult to find. I have a system that requires 4 digit numbers as "requisitionNo". The system uses JSPs and accepts the 4 digit number that the user inputs (fyi - duplicate handling is alr