Get the unwanted fields - inappropriate length - Table

Hello Experts,

SELECT     COUNT ( * ) FROM mtl_system_items_b; 
-> 664072 records
 
In fact, the value of the segment1 should be 9. But there a few unwanted characters and a few extra characters.

If I use the following query to get all the error values of the segment.

Please confirm is this rite of query?
SELECT     segment1
FROM          mtl_system_items_b
WHERE      LENGTH (segment1)  != 9;
 
If there is no other better query thanks to...

Thank you...

In this case, the! = or <> must be correct. that is how you formed the query.

Kind regards
P.

Tags: Database

Similar Questions

  • API: get the contents of a lookup table?

    Hello

    I have a small application that automates the deployment of applications. He, among others, should be able to make calls in VSM.

    I used a previous version of the API with infraEnterpriseAPI.asmx as an entry point, so I'm not totally familiar with that.

    Now, to make a call, the user of my application needs to fill out some information:

    -Call description

    Status - IPK

    -The group in support of the appeal must be sent to

    And that's all. There is another piece of information that is too full, but I put all those automatically.

    Now, I want to give my menus drop down users about the status of the IPK and the "Forward To" field, because I want to choose what type of call, it should be and who to send it to. They don't know the names or the refs of the IPK statutes or support groups, and they shouldn't have to.

    Problem is that I have no idea how to do to get the content of the API lookup tables. Is it possible to do? Or should I (as I did for the previous version) that information straight out of the database?

    Best regards

    Kris

    I think I'll just query the database directly... which seems quite a lot easier.

  • How do I get the separate elements of a table in a bean method?

    Hey everyone, how are you?

    I use Jdeveloper 12.1.2.0.0.

    I have a bean method that gets the items on a table-adf and I need the separate elements (of a given attribute) this table to highlight in the other table.

    For example: my table elements:

    ID name Tecnolgy

    1 oracle ADF

    2 oracle Jdeveloper

    3 Microsoft Visual Studio

    And I need the separate names in this table:

    Oracle; Microsoft

    So I highlighted them in another table.

    Normally I use an iterator and I will one by one and highlight what I want (as you can see, with a large table it can take a long time) and I wanted only to get the separate elements.

    My method of beans as something like this:

    DCIteratorBinding conIter = ADFUtils.findIterator ("VFactSalesNewView1Iterator");

    Line r [] = new Row [conIter.getAllRowsInRange () .length];

    r = conIter.getAllRowsInRange ();

    for (int i = 0; i < conIter.getAllRowsInRange () .length; i ++)

    {

    long productsInt = (Long) r [i] .getAttribute ("FkProduct");

    ...

    matchEmFactSalesProducts (r [i]);

    ..

    }

    I was wondering if it was possible to put a query and return the items in the request as lines (as I do with the iterator) or another possibility here.

    The request for my first table (the one in the example) is the following:

    SELECT VFactSalesNew.N_SALES,

    VFactSalesNew.QUANTITY,

    VFactSalesNew.ID_ANO,

    VFactSalesNew.QUARTER

    OF V_FACT_SALES_NEW VFactSalesNew

    WHERE

    ((nvl(:var_dimCoin,'0') = '0' OR FK_COIN IN (select * from THE (select cast (in_list(:var_dimCoin) as mytableType) double) a)))

    and the table I emphasize only has a select * from tableX;

    Any ideas?

    Kind regards

    Frederico.

    Hi Frederico,

    Hope you are well. Your VFactSalesNew table is filtered by any chance? Approach, you could do is to try to create a new VO with the following query:

    SELECT DISTINCT (yourTable.NAME)

    From yourTable

    But if your table is filtered, then I recommend you create a method in your implementation ViewObject that returns a LIST and there you iterate over the result set. In all cases, you will need to browse the whole list to get distinct values.

    Concerning

  • How do I get the geometric limits of a Table

    I searched the DOM and the forum and cannot find information on obtaining of the geometric boundaries of a table. How can I achieve this? Kurtis

    Hi Kurtis

    Get the width of tables and height and the horizontal and vertical it is containing the character set and you should be able to calculate offsets.

    Trevor

  • Getting the text field value?

    How can I get the value entered into the field of action tf_1?

    Let's say I'm going to number 5 in the text field tf_1, how can I receive it for use in the code?five.png

    I would like to store that value in the variable, so that I can work with him in a function.

    Can someone help me? I am already grateful!

    var num:Number;

    calcular.addEventListener (MouseEvent.CLICK, resolver);

    function resolver(Event:MouseEvent): void {}

    NUM = Number (tf_1.text);

    If (num/400 = 0) {}

    trace ("Yes!");

    }

    }

  • Query to get the flex field values description.

    Hello

    Entering invoices-> all the Distributions screen 'Special Mentions for the India' is here. Here we enter the value for the field TDS - tax. I want to get the list of values for TDS - tax in a query.

    Can you please help me.

    Thank you

    Nanga.

    where 'jtc.tax_type =' TDS

    and jtc.section_type = 'TDS_SECTION. '

    and org_id =: inv_sum_folder.org_id

    and jtc.section_code in

    (

    Select section_code

    of jai_ap_tds_th_vsite_v

    where vendor_id =: inv_sum_folder.vendor_id

    and vendor_site_id =: inv_sum_folder.vendor_site_id

    )

    order of jtc.tax_id

  • How to get the last records of a Table

    Hey Geeks,

    I have this 'conflict '.

    I need to get the 'current balance' for each account, the newest "current_Balance".

    The table looks like this

    ACCOUNT_IDBUSINESS_TRANSACTION_IDCURRENT_BALANCETRANSACTION_AMOUNTTRANSACTION_DATE
    1 062 570238 043 51751'022-20'00031.03.2014 17:49:00.808000
    1 062 570238 042 40771'022-20'00031.03.2014 17:33:55.666000
    1 062 570238 042 36891'022-26'00031.03.2014 17:33:20.067000
    1 062 570238 041 273117'022-50,00031.03.2014 17:18:25.189000
    1 062 570238 041 174167'022-10,00031.03.2014 17:16:59.361000
    1 062 570238 038 702177'022-2'50031.03.2014 16:44:58.332000
    5 607 555238 046 7131'026-28'50031.03.2014 18:35:16.212000
    5 607 555238 040 59229'526-100,00031.03.2014 17:10:15.474000

    I need this result:

    ACCOUNT_ID CURRENT_BALANCE

    5 607 555 1'026

    1 062 570 51'022                   


    How we handle this?


    Thxs for your help


    Ineffective :-)

    SELECT Account_id

    MAX (current_balance) KEEP (DENSE_RANK LAST ORDER BY transaction_date) current_balance

    MAX (business_transaction_id) KEEP (DENSE_RANK LAST ORDER BY transaction_date) business_transaction_id

    Of account_balances

    GROUP BY account_id

    See on Oracle: clause to keep

    Concerning

    Marcus

  • Get the error when switching from table


    Hi all

    I'm moving my procedure table values but no luck. your help in this regard will be highly appreciated. Thanks in advance.

    I created the following procedure:

    -------------

    CREATE OR REPLACE PROCEDURE send_coll

    IS

    TYPE c_dept_no IS TABLE OF THE dept.deptno%TYPE;

    v_dept_no c_dept_no: = c_dept_no();

    BEGIN

    SELECT DeptNo

    TO COLLECT FEES IN BULK

    IN v_dept_no

    EMP;

    END;

    ------------------------

    Now, I want to spend all the values of v_dept_no to one of my name of the procedure as rec_coll that receives the value of v_dept_no and print the value against v_dept_no. for example:

    When v_dept_no = 10 then print all empno against deptno 10 and so on...

    I think I have to do something like below but no luck so far.

    CREATE OR REPLACE PROCEDURE send_coll

    IS

    TYPE c_dept_no IS TABLE OF THE dept.deptno%TYPE;

    v_dept_no c_dept_no: = c_dept_no();

    BEGIN

    SELECT DeptNo

    TO COLLECT FEES IN BULK

    IN v_dept_no

    EMP;

    I'm looping 1.v_dept_no

    rec_coll (v_dept_no (i)); - call the rec_coll procedure and pass in the value

    end loop;

    end;

    ---------------

    create another procedure that will receive the value for v_dept_no

    ------------

    CREATE OR REPLACE PROCEDURE rec_coll (v_emp_no c_dept_no) - create collection with c_dept_no type

    IS

    BEGIN

    I'm looping 1.v_emp_no.count

    dbms_output.put_line (v_emp_no (i));

    END loop;

    END;

    -----------

    I get the error message to create these procedures and if someone help me so I really appreciate it. Thank you

    Concerning

    Shu

    I would just write a single SELECT statement joining EMP and Dept. If this exercise is University (collections of learning PL/SQL types), then you can do something like that.

    I used a PACKET to this implementation. Again, this is not how things are done in the real world.

    SQL > create or replace package coll_pkg
    2 as
    3 type dept_no_tbl is table of the dept.deptno%type;
    4
    5 procedure rec_coll (p_dept_no in dept_no_tbl);
    6 procedure send_coll;
    7 end;
    8.

    Package created.

    SQL > show err
    No errors.

    SQL > create or replace package body coll_pkg
    2 as
    3 procedure rec_coll (p_dept_no in dept_no_tbl)
    4 is
    5. start
    6 because me in 1.p_dept_no.count
    7 loop
    8 d in)
    9 select empno, ename
    10 of PEM
    11 where deptno = p_dept_no (i)
    12                 )
    loop 13
    14 dbms_output.put_line (p_dept_no (i) |) ':' || j.EmpNo | ':' || j.ename);
    15 end loop;
    16 end loop;
    end 17;
    18
    procedure send_coll 19
    20 is
    21 l_dept_no dept_no_tbl: = dept_no_tbl();
    start at 22
    23 deptno select bulk collect into l_dept_no
    24 of the Department;
    25
    26 rec_coll (l_dept_no);
    27 end;
    28 end;
    29.

    Package body created.

    SQL > show err
    No errors.

    SQL > set serveroutput on
    SQL > exec coll_pkg.send_coll
    10:7782:CLARK
    10:7839:KING
    20:7369:SMITH
    20:7566:JONES
    20:7788:SCOTT
    20:7876:ADAMS
    30:7499:ALLEN
    30:7521:WARD
    30:7654:MARTIN
    30:7698:BLAKE
    30:7844:TURNER

    PL/SQL procedure successfully completed.

    SQL >

  • How to get the value of an af:Table SelectOneChoice

    V11.1.2.4.0 - JSF JDeveloper

    Greetings,

    Im having a problem getting a column value that is an object of a select choice.

    This isn't a common problem, as I actually did something that others so please follow my problem

    Description and if you have questions/answers please answer below.

    I create a database view that returns me 3 columns, say TestValue TestCode, TestDescription.

    I added an extra temporally column in my OV and called Temp.

    I drag / drop my OV, remove value Temp and its position of the column, I drag / drop a LOV, who comes from a different view.

    that shows me the doctor name & first name and identification number of the back doctor select a value of choice.

    I'm using a function that go through the iterator, gets the lines and save them in the database (no matter how).

    The problem is my selectonechoice, are not row.bindings.DoctorId.InputValue, but the links. DoctorId.InputValue instead, so I can retrieve value selectonechoice of the current line.

    Then when my loop is finished and insert rows in my database, id of the doctor of the line everyone is the same as the binding do not change through the loop.

    I don't know how to add value to the current line select only one option to use the correct value to each loop of the line.

    Here is my loop function:

            DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            DCIteratorBinding iterator = bc.findIteratorBinding("ExaminationsIterator");
            DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    
    
             RowSetIterator rsi = iterator.getRowSetIterator();  
             int i=0;
             
            OperationBinding save_exams = bindings.getOperationBinding("SAVE_EXAMINATION");
            OperationBinding save_exams_commit = bindings.getOperationBinding("SAVE_EXAMINATION_COMMIT");
               
            try{
             while(i < rsi.getRowCount()){
                 
                 Row r = iterator.getCurrentRow();
                                 
                 save_exams.getParamsMap().put("CodeTest", r.getAttribute("CodeTest"));
                 save_exams.getParamsMap().put("Dates", r.getAttribute("Dates"));   
                 save_exams.getParamsMap().put("CodeId", orderid.getValue());   
                 save_exams.getParamsMap().put("Times", r.getAttribute("Times"));    
                 save_exams.getParamsMap().put("DoctorId", resolveExpression("#{bindings.DoctorId.attributeValue}").toString()); 
                 save_exams.getParamsMap().put("IdPatients", patientid.getValue());   
                 save_exams.execute();
                 rsi.next();
                 i++;
             }
            
                save_exams_commit.execute();
    

    I get the connection id of the current doctor and the value of the rows no.

    Can you help me on this please?

    I created a work around solution, until an expert that I come with a more advanced solution.

    (1) I add a LOV at the id of the doctor on the view target object.

    (2) on the duration, I fill my view of database

    3) go through all my DB view iterator lines

    (4) appends each line on the View object target (missing id of the doctor, because I want it to be on common language runtime) & commit lines

    (5) after the loop ends and the target object from view show me results from the view of DB, I choose the runtime id of the doctor and commit the changes if

    the new lines, with the new update will be finally filled to the database.

    I hope this helps if anyone has a similar task.

    Please let me know if you find a more direct solution, this work with 2 tables to fill 1.

  • I can't get the page numbers in my table of contents to update when I update the book.


    I use Framemaker 11 and I have two tables of contents in my book: one in English and French. Each table of contents to links to various documents in the same book. The reference page for each table of contents is defined and properly displays the positions 1 and 2, I said that it appears, but numbers not updated when the contents of my document files change to another page. I checked the settings of conditional text in my document files; they are correct. When I update the book, I choose to update the numbers, all the cross-references, all text inserts, OLE links, generate a Table of contents, lists, and indexes. What I am doing wrong? Thank you.

    If they are not knocked down, then they are certainly not generated files. See the example in the help of FM11: http://help.adobe.com/en_US/FrameMaker/11.0/Using/images/bk_hier_books.png

    The 'K' is a TOC file that FM recognizes a generated file.

    Because you have created your table of the contents of the French with the help of another structure of the book, you could import reference this TOC file in another file of FM (for example to create an inset text) in the main book you want. However, you need to make updates in two steps. First update the French book to revise the table of contents. Then update the main book to get the rest of the correct pages (and given that the table of french contents are imported by reference, FM always uses the most recent version).

  • How to get the QDR of ADF Pivot table datacell

    JDeveloper 11.1.1.5 version
    Java 1.6
    The ADF faces

    I want to click commandlink in a data cell that sends the value of the header cells to a bean of support. I think that we must get the QDR of a clicked data cell, but how?

    I created the PivotTable: column headers consist of a variable number of dates; row headers consist of the names of the units. The data that cross are a percentage of variance using energy over time. (There is no calculation in the PivotTable, just displaying data from the view).

    ........ 11 Jan 12 13 Jan Jan jan 14. .etc
    Module-1 2.00 5, 25 - 9.30-11.15
    Unit-2 - 554.22 497.00 7.70 2.00
    Unit-3 10.00 - 5, 00 5.00 1.00

    To the cell above it with 497.00 value, the user must click this value (commandlink) and the bean 1) calculate the values of the unit and the date to use as parameter values for ExecuteWithParams under another iterator and 2) navigate to another page using this another iterator.

    It seems that the QDR (reference data) is involved, but can't find enough information about how to implement the same.

    Here are the PivotTable on the jspx:

    < dvt:pivotTable id = "pivotTable1".
    Summary = "reading analytical pivot table.
    value = "#{bindings." CdsaReadingsItfVwView1.pivotTableModel}.
    var = 'cellData.
    varStatus = "cellStatus" >
    < dvt:dataCell >
    < af:commandLink id = "cl".
    Text = "#{cellData.DataValue} '"
    action = "#{pivot_bean.commandlink_action}" / >
    < / dvt:dataCell >
    < / dvt:pivotTable >



    In the bean, we try to getPivotTable(), but it is always null.

    Any direction is welcome.

    David K

    Check how the PivotTable selection demo was created:
    http://jdevadf.Oracle.com/ADF-richclient-demo/faces/feature/PivotTable/pivotTableSelection.JSPX
    Code for this demo here:
    http://www.Oracle.com/technetwork/developer-tools/ADF/documentation/ADF-faces-RC-demo-083799.html

  • How do I get the output of a function table

    Hi all

    Kindly share your idea.


    I need the outputs of a function table only.

    Database version: oracle 10.1.0.2.0

    login_details:

    login_id branch_code

    admin 1
    Admin1 2
    Test 1
    user 1

    I need output for the query function below.

    Select login_id from login_details where branch_code = '1';

    If I create a function:


    FUNCTION to CREATE or REPLACE fn_get_login (pvBranch varchar2)
    IS BACK SYS_REFCURSOR
    REF_TEST SYS_REFCURSOR;
    BEGIN
    OPEN FOR REF_TEST
    Login_id SELECT FROM login_details WHERE branch_code = pvBranch;
    RETURN REF_TEST;

    END;
    /


    Select * from login_master where login_id in (select fn_get_login('01') from double);


    and get

    ORA-00932: inconsistent data types: expected - got CURSER

    Edited by: 887268 October 8, 2012 12:25

    You cannot use a Ref cursor in a table, because it isn't a result set of data, it's just a pointer to a request for enforcement.

    {: identifier of the thread = 886365}

    A ref cursor must be used if you want to refer the request to an external application.

    Transfer data back to a function is to use a pipeline for example function

    SQL> CREATE OR REPLACE TYPE num_descript AS OBJECT(num number, descript varchar2(30))
      2  /
    
    Type created.
    
    SQL>
    SQL> CREATE OR REPLACE TYPE tbl_num_descript AS TABLE OF num_descript
      2  /
    
    Type created.
    
    SQL>
    SQL>
    SQL> CREATE OR REPLACE PACKAGE reftest AS
      2    FUNCTION pipedata(p_choice number) RETURN tbl_num_descript PIPELINED;
      3  END;
      4  /
    
    Package created.
    
    SQL>
    SQL> CREATE OR REPLACE PACKAGE BODY reftest AS
      2    FUNCTION pipedata(p_choice number) RETURN tbl_num_descript PIPELINED IS
      3      v_obj num_descript := num_descript(NULL,NULL);
      4      v_rc  sys_refcursor;
      5    BEGIN
      6      IF p_choice = 1 THEN
      7        OPEN v_rc FOR SELECT empno as num, ename as descript FROM emp;
      8      ELSIF p_choice = 2 THEN
      9        OPEN v_rc FOR SELECT deptno as num, dname as descript FROM dept;
     10      END IF;
     11      LOOP
     12        FETCH v_rc INTO v_obj.num, v_obj.descript;
     13        EXIT WHEN v_rc%NOTFOUND;
     14        PIPE ROW(v_obj);
     15      END LOOP;
     16      CLOSE v_rc;
     17      RETURN;
     18    END;
     19  END;
     20  /
    
    Package body created.
    
    SQL> select * from table(reftest.pipedata(1));
    
           NUM DESCRIPT
    ---------- ------------------------------
          7369 SMITH
          7499 ALLEN
          7521 WARD
          7566 JONES
          7654 MARTIN
          7698 BLAKE
          7782 CLARK
          7788 SCOTT
          7839 KING
          7844 TURNER
          7876 ADAMS
          7900 JAMES
          7902 FORD
          7934 MILLER
    
    14 rows selected.
    
    SQL> select * from table(reftest.pipedata(2));
    
           NUM DESCRIPT
    ---------- ------------------------------
            10 ACCOUNTING
            20 RESEARCH
            30 SALES
            40 OPERATIONS
    
    SQL>
    

    but of course, it is wise to just use pure SQL that in order to mix the PL/SQL in queries in the form of best performance features.

    Perhaps explain what problem you are trying to solve when trying to use a function, and we can advise you on the best options.

  • How to get the value of row current table when press the button submit

    Hello

    I want to get the current value of the SuccessionPlanId line which is part of the column in a table that is advanced.

    I created a (created using customization, from action through CO) button in the table as column, so each line with a single key, if I press the button of the first line means so I want to extract the first line SuccessionPlanId and if it's the 3rd way so I want to get the value of the value of the third row.

    How in the post of controller?

    Please answer soon, its urgency.

    Thanks in advance,
    SAN

    OK, need to go with a delicate way,

    1.) create a new table with Jdeveloper and there shud be a replica of the room once except the button submit newly added, pls note button type shud be present the type of button.

    2.) hide the existing table area and create a new stacklayoutbean.

    (3.) this stacklayout bean will have the property to extend, you give the full path of the new custom of advanced table box.

    Now you should be able to get the reference of the line during the click on the "submit" button

  • compare the 4 fields in a table

    Hi, today my brain pains, can someone please tell me how to compare 4 fields in a table to see if they are all equal?
    create table dm_test (n_1 number,
    n_2 number,
    n_3 number,
    n_4 number);
    INSERT INTO dm_test
         (n_1,
          n_2,
          n_3,
          n_4)
    VALUES
         (1,
          1,
          1,
          1);
         
     INSERT INTO dm_test
         (n_1,
          n_2,
          n_3,
          n_4)
    VALUES
         (3,
          2,
          2,
          2);
             
      INSERT INTO dm_test
         (n_1,
          n_2,
          n_3,
          n_4)
    VALUES
         (0,
          0,
          0,
          3);
            
    The result of my query must return only
    first row
    1 1 1 1

    Thanks people...

    Maybe something like that?

    SQL> SELECT  *
      2  FROM    dm_test
      3  WHERE   n_1 = n_2
      4  AND     n_2 = n_3
      5  AND     n_3 = n_4
      6  /
    
                     N_1                  N_2                  N_3                  N_4
    -------------------- -------------------- -------------------- --------------------
                       1                    1                    1                    1
    

    It won't however if you're concerned about NULL values. Do you want a row to return if they are NULL?

    EDIT:

    The version that supports the NULL:

    SQL> INSERT INTO dm_test VALUES(NULL,NULL,NULL,NULL);
    
    1 row created.
    
    SQL> SET NULL '(null)'
    
    SQL> SELECT  *
      2  FROM    dm_test
      3  WHERE   NVL(n_1,-1) = NVL(n_2,-1)
      4  AND     NVL(n_2,-1) = NVL(n_3,-1)
      5  AND     NVL(n_3,-1) = NVL(n_4,-1)
      6  /
    
                     N_1                  N_2                  N_3                  N_4
    -------------------- -------------------- -------------------- --------------------
                       1                    1                    1                    1
    (null)               (null)               (null)               (null)
    

    Edited by: Centinul May 14, 2010 07:07

  • How to encrypt a USB, when I get the message "(GPT) GUID Partition Table partitioning scheme is required? '."

    I just tried to encrypt a USB drive with my Mac book (latest version) and got the message "A GUID Partition Table (GPT) partitioning schΘma required." What does this mean and suggestions on how to proceed?

    The drive must be formatted for Mac. Start in the Recvery mode. Erase the drive using disk utility (select the top icon which represents the entire disk and click clear. Partition scheme must be Mac OS (Extended) first partition GUID, which is the default value.

    If you want to install a system on it follow these steps:

    How to reinstall OS X on your Mac - Apple Support

Maybe you are looking for