How to count unique values based on specific criteria

Hello,
I need to count the number of unique values in column A but only if the text in column I is a specific word - how do I do this? 

Let's say the values are in A1:A10 and they are numeric, and the text is in I1:I10.
As an array formula, confirmed with Ctrl+Shift+Enter:
=SUM(IF(I1:I10="word",1/COUNTIFS(A1:A10,A1:A10,I1:I10,"word")))
where "word" is the specific word you're looking for.
Regards, Hans Vogelaar (http://www.eileenslounge.com)

Similar Messages

  • How to count Unique Values in BEx

    Hi Guys,
    Can anybody please let me know how to count unique values of a characteristic.
    Thanx in advance
    Peter

    I have a similar scenario. If i drill up on the characterstic that had a count of one in each record, the total number of records should be stay equal to the summarised results in the last screen.
    Would someone know how to do that .
    Arti

  • How to count ONLY fields with a specific value

    I modified the code below from the API reference to count combobox fields with a value of "MT" so I could total the number of a specific choice the form user input.
    var count = 0;
    for (var i=0; i<this.numFields; i++)
    var fname = this.getNthFieldName(i);
    if ( this.getField(fname).type == "combobox" && this.getField(fname).value == "MT" ) count++;
    this.getField("mTurb").value = count.value;
    Here's the problem: I tried to use a similar script, modified only slightly from this form, in another total field to tally a different choice made with comboboxes and the script continues to tally the first choice. An example of one of the modified versions of the script is below.
    var gcount = 0;
    for (var i=0; i<this.numFields; i++)
    var gname = this.getNthFieldName(i);
    if ( this.getField(gname).type == "combobox" && this.getField(gname).value == "MT" ) gcount++;
    this.getField("gPack").value = gcount.value;
    I suspect I'm just missing something painfully obvious to seasoned scripters, but I can't seem to figure it out and I need this script to be able to count the number of 9 different options in the comboboxes.

    OK, you can use a script like the following as the custom calculate script for the text fields that perform the counts:
    // Custom calculate script for text field
    (function () {
        // Declare and initialize variables
        var fn, s = "MT", count = 0;
        // Loop through the combo boxes
        for (var i = 1; i < 25; i++) {
            // Determine the current field name
            fn = "M" + util.printf("%02d", i));
            // See if the field value matches
            if (getField(fn).valueAsString === s) count++
        // Set this field value to the count
        event.value = count;
    Change the value of the "s" variable to match the item that you want to count. The first and last lines prevent the unnecessary creatio of global variables, which is good. It also makes it easy to transfer to a more general document-level routine, which would be event better, something like:
    // Custom calculate script for text field
    function getCBCount(s) {
        var fn, count = 0;
        // Loop through the combo boxes
        for (var i = 1; i < 25; i++) {
            // Determine the current field name
            fn = "M" + util.printf("%02d", i));
            // See if the field value matches
            if (getField(fn).valueAsString === s) count++
        // Set this field value to the count
        event.value = count;
    You would then call this function from the individual text boxes with the following custom calculate script:
    getCBCount("MT");
    and replace "MT" with the vlaue you want to count.

  • How to get ATINN value based on material number and Class Type ?

    I have below SELECT stmt code which gives the correct value of atwrt based on materil no and ATINN.
    However in quality system, it is failing because in quality system "atinn" value is not 0000000381. It is different.
    So how can I get ATINN(Internal characteristic) value based on material number and Class Type?
    -Obtain the batch characterstic value for the Material******************
      SELECT atwrt
        UP TO 1 ROWS
        INTO v_charvalue
        FROM ausp
       WHERE objek = mcha-matnr
         AND atinn = '0000000381'   " 'US80_FRENCH_ON_LABEL'
         AND klart = '001'.
    THANKS N ADVANCE.

    Hi SAm,
    use the Below function module to get the Atinn for Atwrt for thr Class and MAterial combination..
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
          EXPORTING
            classtype          = '023'       "Class type
            object             = w_object  "Material number with Leading zeros
            no_value_descript  = 'X'      "Default X
            objecttable        = 'MCH1'    "Table name Mara or MCH1 or MARC
          TABLES
            t_class            = t_class   "It return the Batch class available for the above combination
            t_objectdata       = t_char  "Return Batch characteristics(ATWRT) and their value ATINN in this table
          EXCEPTIONS
            no_classification  = 1
            no_classtypes      = 2
            invalid_class_type = 3
            OTHERS             = 4.
    Regards,
    Prabhudas

  • How to update unique values

    I want to update the unique values, if they are not inserted... Please help in this regard
    CREATE OR REPLACE PROCEDURE PR IS
    lv_operator VARCHAR2(1) := 'N';
    TYPE subset_rt IS RECORD
    ltt_whse_loc oe_sales_ord_commit.whse_loc%TYPE,
    ltt_shape oe_sales_ord_commit.shape%TYPE,
    ltt_isize oe_sales_ord_commit.isize%TYPE,
    ltt_grade oe_sales_ord_commit.grade%TYPE,
    ltt_length oe_sales_ord_commit.length%TYPE,
    ltt_pieces NUMBER,
    ltt_inv_lbs_commit oe_sales_ord_commit.inv_lbs_commit%TYPE,
    ltt_roll_lbs_commit oe_sales_ord_commit.roll_lbs_commit%TYPE,
    ltt_ishcom_lbs oe_sales_ord_commit.ishcom_lbs%TYPE);
    TYPE subset_aat IS TABLE OF subset_rt
    INDEX BY PLS_INTEGER;
    aa_subset subset_aat;
    errors NUMBER;
    dml_errors EXCEPTION;
    PRAGMA EXCEPTION_INIT(dml_errors, -24381);
    BEGIN
    lv_operator := sy_checkpriv(USER,
    'SY_OPERATIONS');
    SELECT whse_loc,
    shape,
    isize,
    grade,
    length,
    0,
    inv_lbs_commit,
    roll_lbs_commit,
    ishcom_lbs
    BULK COLLECT INTO aa_subset
    FROM oe_sales_ord_commit_temp
    WHERE processed_datetime IS NULL
    AND username = decode(lv_operator,
    'Y',
    username,
    USER);
    BEGIN
    FORALL indx IN 1 .. aa_subset.COUNT SAVE EXCEPTIONS
    INSERT INTO
    (SELECT loc,
    shape,
    isize,
    grade,
    length,
    pieces,
    inv_lbs_commit,
    roll_lbs_commit,
    ishcom_lbs FROM oe_inventory_temp)
    VALUES
    aa_subset(indx);
    EXCEPTION
    WHEN OTHERS THEN
    *+<<Trap the rows that have failed due to dup_val_on_index exception and update the inv_lbs_commit,+*
    *+roll_lbs_commit, ishcom_lbs columns in oe_inventory_temp table>>+*
    -- loc,shape, isize,grade, length, pieces are composite primary keys.
    errors := SQL%BULK_EXCEPTIONS.COUNT;
    DBMS_OUTPUT.PUT_LINE('Number of statements that failed: ' || errors);
    FOR i IN 1..errors LOOP
    DBMS_OUTPUT.PUT_LINE('Error #' || i || ' occurred during '||
    'iteration #' || SQL%BULK_EXCEPTIONS(i).ERROR_INDEX);
    DBMS_OUTPUT.PUT_LINE('Error message is ' ||
    SQLERRM(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE));
    DBMS_OUTPUT.PUT_LINE(aa_subset(SQL%BULK_EXCEPTIONS(i).ERROR_INDEX));
    END LOOP;
    END;
    END PR;
    /

    Due to the following restriction a number of simple collections is used instead of the collection of records.
    [FORALL Statement|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/forall_statement.htm#sthref2742]: You cannot refer to individual record fields within DML statements called by a FORALL statement. Instead, you can specify the entire record with the SET ROW clause in an UPDATE statement, or the VALUES clause in an INSERT statement.
    10g syntax of FORALL statement is used:
    SQL> select * from a;
           INT DT         STR
             1 10.02.2009 123
             2 11.02.2009 567
    SQL> desc a
    Name                                      Null?    Type
    INT                                       NOT NULL NUMBER(38)
    DT                                                 DATE
    STR                                                VARCHAR2(20)
    SQL> select * from a;
           INT DT         STR
             1 10.02.2009 123
             2 11.02.2009 567
    SQL> DECLARE
      2    TYPE T_Int_List IS TABLE OF A.Int%TYPE INDEX BY PLS_INTEGER;
      3    TYPE T_Dt_List IS TABLE OF A.Dt%TYPE INDEX BY PLS_INTEGER;
      4    TYPE T_Str_List IS TABLE OF A.Str%TYPE INDEX BY PLS_INTEGER;
      5  
      6    vInts T_Int_List;
      7    vDts T_Dt_List;
      8    vStrs T_Str_List;
      9 
    10    eBulk_Error EXCEPTION;
    11    PRAGMA EXCEPTION_INIT(eBulk_Error, -24381);
    12  BEGIN
    13    vInts(1) := 2;
    14    vDts(1) := sysdate - 1;
    15    vStrs(1) := '888';
    16 
    17    vInts(2) := 3;
    18    vDts(2) := sysdate - 22;
    19    vStrs(2) := '0000';
    20 
    21    BEGIN
    22      FORALL indx IN INDICES OF vInts SAVE EXCEPTIONS
    23        INSERT INTO A(Int, Dt, Str)
    24          VALUES(vInts(indx), vDts(indx), vStrs(indx));
    25    EXCEPTION
    26      WHEN eBulk_Error THEN
    27        DECLARE
    28          vErr_Count INTEGER;
    29          vErr_Message VARCHAR2(2000);
    30          vErr_Indices T_Int_List;
    31        BEGIN
    32          vErr_Count := SQL%BULK_EXCEPTIONS.COUNT;
    33          -- Getting the indices of rows with duplicate key
    34          -- FOR vI IN 1 .. SQL%BULK_EXCEPTIONS.COUNT LOOP - Doesn't work for some reason on 10.2.0.1.0
    35          FOR vI IN 1 .. vErr_Count LOOP
    36            IF SQL%BULK_EXCEPTIONS(vI).Error_Code <> 1 THEN
    37              -- Error other that duplicate key is reraised
    38              vErr_Message := SQLERRM(-SQL%BULK_EXCEPTIONS(vI).Error_Code);
    39              Raise_Application_Error(-20001, vErr_Message);
    40            END IF;
    41            vErr_Indices(SQL%BULK_EXCEPTIONS(vI).ERROR_INDEX) := SQL%BULK_EXCEPTIONS(vI).ERROR_INDEX;
    42          END LOOP;
    43       
    44          -- Bulk update
    45          FORALL vI IN INDICES OF vErr_Indices
    46            UPDATE A SET
    47                Dt = vDts(vI),
    48                Str = vStrs(vI)
    49              WHERE Int = vInts(vI);
    50        END;
    51    END;
    52  END;
    53  /
    PL/SQL procedure successfully completed.
    SQL> select * from a;
           INT DT         STR
             1 10.02.2009 123
             2 09.02.2009 888
             3 19.01.2009 0000Regards,
    Dima
    Edited by: DimaCit on Feb 10, 2009 10:39 AM

  • How to count unique entries accross the data grid?

    So I have managed to put a bunch of data into a partitioned cache 3 nodes.
    And now I would like to perform the following query/calculation.
    Say I have the following model...
    Person
    firstName
    lastName
    phoneNumber
    creditCard
    email
    ipAddress
    Given a person's email, count unique phoneNumbers, ipaddresses and creditCards.
    Or
    Given a person' s credit card count how many unique phonenumber, emails and ipAddresses.
    That said if we have the follwoing data...
    John Smith - [email protected] - 555-555-5555 - 1234567890000000 - xxx.xxx.xxx.xxx
    John Smith - [email protected] - 999-555-5555 - 1234567890000000 - xxx.xxx.xxx.yyy
    John Smith - [email protected] - 777-555-5555 - 1234567890000000 - xxx.xxx.xxx.yyy
    For query 1 given [email protected] I should get back
    1 unique phoneNumber
    1 unique creditCard
    2 unique ips
    For query 2 given 1234567890000000
    3 unique phoneNumbers
    2 unique emails
    2 unique ips
    Is possible through a regular query?
    Basically it's a cross reference algorithm.
    Edited by: 884647 on Sep 27, 2011 8:33 AM
    Edited by: 884647 on Sep 27, 2011 8:37 AM

    Just found this in a thread...
    Filter filter = ....
    ValueExtractor email = new ReflectionExtractor("email");
    ValueExtractor phone = new ReflectionExtractor("phonenumber");
    ValueExtractor ip = new ReflectionExtractor("phonenumber");
    Map mapResult = cache.aggregate(filter, new CompositeAggregator(new EntryAggregator[] {new ReducerAggregator(email), new ReducerAggregator(phone), new ReducerAggregator(ip)});
    Seems like the right solution and this works across a partitioned cache?

  • How to Count Row Values

    Hi,
    In a Table 50 Columns are there and 10 Records are there. In those 10 records are not inserted all columns (Some are null values). How to find The Count of Record (Row) Values .
    For Example
    Table
    p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 .........
    10 20 30 40 50
    20 30
    60 80
    In the Above table, how to find
    the count of values in 1st record is 5
    the count of values in 2nd record is 2
    the count of values in 3rd record is 2
    Thanks & Regards,
    Hari

    Hi ,
    CREATE TABLE Sample
    Col1 NUMBER(2),
    Col2 NUMBER(2),
    Col3 NUMBER(2),
    Col4 NUMBER(2),
    Col5 NUMBER(2),
    Col6 NUMBER(2),
    Col7 NUMBER(2),
    Col8 NUMBER(2),
    Col9 NUMBER(2),
    Col10 NUMBER(2)
    Table Created.
    I inserted Data like below
    Col1     Col2     Col3     Col4     Col5     Col6     Col7     Col8     Col9     Col10
    10          20          30     40     50     70          60
         10     30     40     50     60               20     
    10               20               30               
         10           20               30          40
    10          20               30          40     50     
    10     20     30 40     50     60     70     80      90      100
         10 20                                   
    10               20          30               40     
         10     20 30 40      50     60     70          
    10 20 30 40
    In the above data, How To find out
    1st row has 7 Values (Which Columns are not null)
    2nd Row has 6 Values
    3rd Row has 3 Values
    4th Row has 4 Values
    5th Row has 5 Values
    6th Row has 10 Values
    7th Row has 2 Values
    8th Row has 4 Values
    9th Row has 7 Values
    10th Row has 4 Values

  • How to ensure unique values of all records in the form?

    Hi all,
    I need to do some personalization in this Oracle EBS Form  - Purchasing Super User -> Receiving  -> Receipts -> Lot Entry
    I must ensure that evry record entered on that form has a unique value in the column Lot Number.
    Can anybody advise me please?
    Thank you, Willy

    Hi there.
    One way to do this is to do a SPQuery and convert it to a datatable using the GetDataTable method and then to a View. The View then has the ability to get unique values using the ToTable method, something like this:
    SPList list = SPContext.Current.Web.Lists["MyList"];
    SPQuery query = new SPQuery();
    query.Query = "<OrderBy><FieldRef Name='Title' /></OrderBy>";
    DataTable table = list.GetItems(query).GetDataTable();
    DataView v = new DataView(table);
    string[] columns = {"Title"};
    DataTable tbl = v.ToTable(true, columns);
    Hope this helps.
    Regards,
    Magnus
    My blog: InsomniacGeek.com

  • Return array value based on selection criteria

    I have one data field that holds text data similar to below:
    "Meeting Room 1 (Projector), Meeting Room 2 (Whiteboard), Meeting Room 3 (Video Conferencing)"
    "Meeting Room 3 (LCD Display), Meeting Room 1 (Video Conferencing), Meeting Room 2 (Whiteboard)"
    The meeting rooms are not always in the same order, I cant count on Meeting Room 1 being followed by Meeting Room 2 etc.
    My objective is to only return the meeting room that has the Whiteboard.
    I'm aware that I can use SPLIT to seperate the Meeting Rooms by the comma and place their components into an array.
    What I'm not sure how to do is return the meeting room with the Whiteboard when that could be [1] in the Array or [2] or [3] in the array.
    I need to return the array value based on its contents. Could someone help me 'search' the array created by the SPLIT command and always return that value with the word 'Whiteboard'

    This works
    whileprintingrecords;
    global stringvar x:='';
    global numbervar n:=1;
    While n <= Ubound(split('......, Meeting Room X (Whiteboard),..............', ",")) Do
    if split('..........., Meeting Room X (Whiteboard), ............', ",")[n] like '*Whiteboard*'
    then x:=split('.............., Meeting Room X (Whiteboard), ..............', ",")[n];
    n := n + 1;
    x;
    Just replace my string with your field.
    Ian

  • Person DFF Context Value based on 2 criteria (Business Group and Emp Type)?

    Hello,
    We're implementing HR module into multiple business groups.
    I need to define context value for DFF "Additional Personal Details" based on 2 criteria Business Group ID and Employee Type
    Any idea how to do it?
    Thank you
    Elie

    Hello Elie,
    I am not sure on it,However have you tried creating a context with combination of Business Group and Person Type using merging,
    business_group_id || "_"|| person_type_id And structures would be something like 80_2112 Business Group id = 80 and Person Type id=2112.
    It may resolve your issue if this works out.
    Regards,
    Saurabh

  • Return a value based on multiple criteria

    Dear Support Community,
    I am trying to formulate a function so that I am able to return a cell value based on more than one criteria.
    Referring to the attached screen shot, "Local Start Time" refers to the time that a person will start a work shift, and depending on the "sectors" the person's duration of time at work will vary.
    For example, if a person starts work between 07:00am and 07:59am AND the particular shift involves 2 sectors, the allowed time at work is 12H15M. However, given the exact start time, if the shift only involves ONE "sector' the allowed time at work becomes 13H00M etc.
    I am trying to formulate a function whereby I can tell the spreadsheet the local start time AND sectors, and then have the appropriate time returned.
    I hope the above makes sense!
    Thanks
    ST

    Hi ST,
    Print your table and pin it up as a "Ready Reckoner" for humans to refer to.
    Convert your table into a Database, something like this:
    Start
    Finish
    Sectors
    Allowed Duration
    Scenario
    0700
    0759
    1
    13h 0m
    1
    0700
    0759
    2
    12h 15m
    2
    0700
    0759
    3
    11h 30m
    3
    0800
    1259
    1
    14h 0m
    4
    0800
    1259
    2
    13h 15m
    5
    0800
    1259
    3
    12h 30m
    6
    1300
    1759
    1
    13h 0m
    7
    1300
    1759
    2
    12h 15m
    8
    1300
    1759
    3
    11h 30m
    9
    1800
    2159
    1
    12h 0m
    10
    1800
    2159
    2
    11h 15m
    11
    1800
    2159
    3
    10h 30m
    12
    2200
    0659
    1
    11h 0m
    13
    2200
    0659
    2
    10h 15m
    14
    2200
    0659
    3
    9h 30m
    15
    (You may want to check that I have converted correctly)
    Columns A and B have a Custom Format that allows them to be numbers (not Text) with leading zeroes.
    Hide Separator to get rid of the comma
    Show zeroes for Unused Digits to show leading zeroes.
    Then you can enter "Army Time" (24 hour clock with leading zeroes) into a Query table
    Thunderstorms playing havoc here with my internet connection. I will post this now. Watch for the next instalment.
    Regards,
    Ian

  • How can I extract value based on the specific tag?

    Hello,
    I have a sample xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <listings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://local.google.com/local_feed.xsd">
    <language>en</language>
    <datum>WGS84</datum>
    <listing>
    <id>242238</id>
    <name>Baskin-Robbins</name>
    <date month="5" day="13" year="2010" />
    <content>
    <text type="menu">
    <link>http://www.allmenus.com/ca/san-fernando-valley/242238-baskin-robbins/menu/</link>
    <title>Baskin-Robbins</title>
    <author>Allmenus.com</author>
    <body>View this menu online at Allmenus.com</body>
    </text>
    <attributes>
    <link>http://www.allmenus.com/ca/san-fernando-valley/242238-baskin-robbins/menu/</link>
    <title>Baskin-Robbins</title>
    <attr name="Average Entree">$41.95</attr>
    <attr name="Cuisine">Ice Cream</attr>
    <attr name="Cuisine">American</attr>
    <attr name="Payment accepted">Cash</attr>
    <attr name="Feature">Cheap Eats</attr>
    <attr name="Feature">Kid Friendly</attr>
    <attr name="Feature">Fast Food</attr>
    <date month="5" day="13" year="2010" />
    </attributes>
    </content>
    </listing>
    <listing>
    <id>243810</id>
    <name>Villa Maria Pizzeria &amp; Restaurant</name>
    <date month="5" day="13" year="2010" />
    <content>
    <text type="menu">
    <link>http://www.allmenus.com/ny/nassau-county/243810-villa-maria-pizzeria--restaurant/menu/</link>
    <title>Villa Maria Pizzeria &amp; Restaurant</title>
    <author>Allmenus.com</author>
    <body>View this menu online at Allmenus.com</body>
    </text>
    <attributes>
    <link>http://www.allmenus.com/ny/nassau-county/243810-villa-maria-pizzeria--restaurant/menu/</link>
    <title>Villa Maria Pizzeria &amp; Restaurant</title>
    <attr name="Hours">Sun 12pm-9pm; Mon 11am-10pm; Tue 11am-10pm; Wed 11am-10pm; Thu 11am-10pm; Fri 11am-10pm; Sat 11am-10pm</attr>
    <attr name="Last Delivery">Sun 9pm; Mon 10pm; Tue 10pm; Wed 10pm; Thu 10pm; Fri 10pm; Sat 10pm</attr>
    <attr name="Order Online">http://orders.allmenus.com/restaurant.asp?restid=5999&amp;campusid=835</attr>
    <attr name="Average Entree">$7.95</attr>
    <attr name="Minimum for Delivery">$25.00</attr>
    <attr name="Cuisine">Pizza</attr>
    <attr name="Cuisine">Sandwiches</attr>
    <attr name="Cuisine">Calzones</attr>
    <attr name="Payment accepted">Cash</attr>
    <attr name="Payment accepted">Visa</attr>
    <attr name="Payment accepted">Mastercard</attr>
    <attr name="Payment accepted">Discover</attr>
    <attr name="Payment accepted">Amex</attr>
    <attr name="Nearby School">Hofstra University</attr>
    <attr name="Nearby School">SUNY-Farmingdale</attr>
    <attr name="Feature">Free Delivery</attr>
    <attr name="Feature">Open 7 Days</attr>
    <attr name="Online Order">Yes</attr>
    <date month="5" day="13" year="2010" />
    </attributes>
    </content>
    </listing>
    </listings>
    As you can see, some row has <attr name="Order Online"> and some don't. I want to extract value of this attribute. It can be null for rows that don't have this attribute. How can I do it with extractvalue function? THANKS A LOT!

    I figured it out that I should do the following:
    select extractvalue(value(x),'/listing/content/attributes/attr[@name="Order Online"]')
    from load_xml_file t, table(xmlsequence(extract(t.xml,'/listings/listing'))) x
    Thanks!

  • How to generate unique values while initializing values

    I am initializing values in my pl/sql program and want to use a sequence to set my unique ids but it errors out. Below is what I use.
    ie. table_id := table_seq.nextval;
    How can I use my sequence to initialize values or is this possible?

    The method suggested by user605919 will work. However, you don't need to initialize a variable like this. It is better and more performant to do it like the third example below:
    SQL> create table mytable
      2  ( id number(6)
      3  , description varchar2(30)
      4  )
      5  /
    Tabel is aangemaakt.
    SQL> create sequence table_seq start with 1 increment by 1
      2  /
    Reeks is aangemaakt.
    SQL> declare
      2    table_id mytable.id%type := table_seq.nextval;
      3  begin
      4    insert into mytable
      5    ( id
      6    , description
      7    )
      8    values
      9    ( table_id
    10    , 'Some description'
    11    );
    12  end;
    13  /
      table_id mytable.id%type := table_seq.nextval;
    FOUT in regel 2:
    .ORA-06550: line 2, column 41:
    PLS-00357: Table,View Or Sequence reference 'TABLE_SEQ.NEXTVAL' not allowed in this context
    ORA-06550: line 2, column 12:
    PL/SQL: Item ignored
    ORA-06550: line 9, column 5:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 9, column 5:
    PL/SQL: ORA-00904: "TABLE_ID": invalid identifier
    ORA-06550: line 4, column 3:
    PL/SQL: SQL Statement ignored
    SQL> declare
      2    table_id mytable.id%type;
      3  begin
      4    select table_seq.nextval
      5      into table_id
      6      from dual
      7    ;
      8    insert into mytable
      9    ( id
    10    , description
    11    )
    12    values
    13    ( table_id
    14    , 'Some description'
    15    );
    16  end;
    17  /
    PL/SQL-procedure is geslaagd.
    SQL> begin
      2    insert into mytable
      3    ( id
      4    , description
      5    )
      6    values
      7    ( table_seq.nextval
      8    , 'Some description'
      9    );
    10  end;
    11  /
    PL/SQL-procedure is geslaagd.And if you need the id value for some code after the insert, you use the RETURNING clause.
    Regards,
    Rob.

  • How to change z-value in a specific region in intensity graph

    Hi all!
    I have an intensity graph and I want to mark a specific region which is dark and then change the z-value(autoscale) so I can see what's in  this region, of course the rest of the intensity graph will be very bright but it's not a problem.  How do I do that?
    Thanks in advance
    Giang

    Easiest method is to change the z scale, unselect autocscale z and rescale the max and min z to the max and minimum region of interest.  This can be easily automated, by using the roi as a subset of the input array and then get max min of the subset and feed it to the z-scale property max min.
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Routine to count unique values

    Hi Gurus,
    I am BI user,  I am trying to write a routine to populate count if employee and month from source fields is unique.
    For example:
    Employee   calmonth       count
    10000          01.2008         1
    10000          02.2008         1
    10001          01.2008         1
    10000          01.2008         0
    Please can you help me with the code and any suggestions to write the code.
    Regards,
    Reddy.

    Hi Eric,
    Below is my code, count is always showing "0".
          CLASS routine IMPLEMENTATION
    CLASS lcl_transform IMPLEMENTATION.
      METHOD compute_0HDCNT_LAST.
      IMPORTING
        request     type rsrequest
        datapackid  type rsdatapid
        SOURCE_FIELDS-PERSONAL_NO TYPE N LENGTH 000008
        SOURCE_FIELDS-ZZMONTH TYPE C LENGTH 000007
       EXPORTING
         RESULT type tys_TG_1-HDCNT_LAST
        DATA:
          MONITOR_REC    TYPE rsmonitor.
    $$ begin of routine - insert your code only below this line        -
    TYPES:
    BEGIN of ty_itab,
    PERSONAL_NO(8) type n,
    ZZMONTH(7) type c,
    count(1) type c,
    end of ty_itab.
    data: itab type table of ty_itab.
    field-symbols : <line> type ty_itab.
    append SOURCE_FIELDS-PERSONAL_NO to itab.
    append SOURCE_FIELDS-ZZMONTH  to itab.
    sort itab by PERSONAL_NO ZZMONTH.
    loop at itab assigning <line>.
    <line>-count = '0'.
    AT NEW ZZMONTH.
    <line>-count = '1'.
    ENDAT.
    endloop.
    $$ end of routine - insert your code only before this line         -
      ENDMETHOD.                    "compute_0HDCNT_LAST
          Method invert_0HDCNT_LAST
          This subroutine needs to be implemented only for direct access
          (for better performance) and for the Report/Report Interface
          (drill through).
          The inverse routine should transform a projection and
          a selection for the target to a projection and a selection
          for the source, respectively.
          If the implementation remains empty all fields are filled and
          all values are selected.
      METHOD invert_0HDCNT_LAST.
    $$ begin of inverse routine - insert your code only below this line-
    ... "insert your code here
    $$ end of inverse routine - insert your code only before this line -
      ENDMETHOD.                    "invert_0HDCNT_LAST
    ENDCLASS.                    "routine IMPLEMENTATION

Maybe you are looking for

  • How to auto save and pre-fill some textfields

    first time i open a pdf, there are some textfields. they are all empty. i click on a button to call a web service. this returns some text and fill in those textfields. if one of these textfields, "message", has got an auto-filled text "success", then

  • Blank.template file issue

    Alright guys, I messed up! I was trying to get pages to permantly set the default language to Australian English, when I found that the pretty much the only way to do it is save a new blank template. (this is the normal blank template with the langua

  • I want to cancel a plan

    I want to cancel my creative cloud and purchase the photography , can't seem to do it online, just goes in circles

  • How to update progressbar while doing serverside processing?

    Hi, I have the following use case: - When the user clicks a button a file must be downloaded. Because it can take some time before the server gathered the data, a progressindicator must be shown. After that the file is presented to the user. Currentl

  • Cannot install iOS 6 on my iPhone or iPad

    Hey. I have an iPhone 4S and an iPad 2. Both non-jailbroken and the iPhone 4S is factory locked. So it only works on one carrier. I want to update to iOS 6 on both of them. It gets to almost end of the installation and then i get download error on bo