AF:table with the search query present bindvariable name in the filter text field

I created a simple display with a criterion of the view object. The criteriy defines a group with 4 criteria. Each element of the criteria has a STARTSWITH operator and compare a column to a binding parameter. The binding variable is marked as optional.
Then I move the data control named on my page and selected criteria "Read - Only ADF filtered table"

When the page is displayed to the user, I had the table containing the search field in the header.
Unfortunately, the entry to the filter of the table fields are not empty, but containing the name of the connection variable.

text in a filter for GebeCode: VarGebeCode *.
text in a filter for NiedCode: VarNiedCode *.
...

When the user just wants to filter on a property, for example GebeCode, the user must
(1) type in the GebeCode
(2) delete the input for other filter box filter: NiedCode,...
Step 2 is heavy, but if the user does not specify an empty text in the filter, no lines are selected in the query.

1 question
How can I get the boxes of entry filter empty the first time the page is loaded?

2 question
As see you in the criteria listed below, I put the box "Ignoe box" (-> UpperColumns = '1') to make my case insensitive search.
How ever, it does not work: it is always case sensitive.

How can I get the framework to do things?


It is the resuling query where clause:
 ( ( ( UPPER(MITA_NAME_VORNAME_CODE) LIKE UPPER( :VarMitaNameVornameCode || '%')  )  OR  ( :VarMitaNameVornameCode IS NULL ) ) 
AND ( ( UPPER(MITA_CODE) LIKE UPPER( :VarMitaCode || '%')  )  OR  ( :VarMitaCode IS NULL ) ) 
AND ( ( UPPER(GEBE_CODE) LIKE UPPER( :VarGebeCode || '%')  )  OR  ( :VarGebeCode IS NULL ) ) 
AND ( ( UPPER(NIED_CODE) LIKE UPPER( :VarNiedCode || '%')  )  OR  ( :VarNiedCode IS NULL ) ) ) 
Code MitarbeiterViewRVOCriteria
  <ViewCriteria
    Name="MitarbeiterViewRVOCriteria"
    ViewObjectName="model.mitarbeiterDetails.view.MitarbeiterViewRVO"
    Conjunction="AND">
    <Properties>
      <CustomProperties>
        <Property
          Name="displayOperators"
          Value="InAdvancedMode"/>
        <Property
          Name="autoExecute"
          Value="false"/>
        <Property
          Name="allowConjunctionOverride"
          Value="true"/>
        <Property
          Name="showInList"
          Value="true"/>
        <Property
          Name="mode"
          Value="Basic"/>
      </CustomProperties>
    </Properties>
    <ViewCriteriaRow
      Name="vcrow12"
      UpperColumns="1">
      <ViewCriteriaItem
        Name="MitaNameVornameCode"
        ViewAttribute="MitaNameVornameCode"
        Operator="STARTSWITH"
        Conjunction="AND"
        Value=":VarMitaNameVornameCode"
        IsBindVarValue="true"
        Required="Optional"
        UpperColumns="1"/>
      <ViewCriteriaItem
        Name="MitarbeiterViewRVOCriteria_vcrow12_MitaCode"
        ViewAttribute="MitaCode"
        Operator="STARTSWITH"
        Conjunction="AND"
        Value=":VarMitaCode"
        IsBindVarValue="true"
        Required="Optional"
        UpperColumns="1"/>
      <ViewCriteriaItem
        Name="MitarbeiterViewRVOCriteria_vcrow12_GebeCode"
        ViewAttribute="GebeCode"
        Operator="STARTSWITH"
        Conjunction="AND"
        Value=":VarGebeCode"
        IsBindVarValue="true"
        Required="Optional"
        UpperColumns="1"/>
      <ViewCriteriaItem
        Name="NiedCode"
        ViewAttribute="NiedCode"
        Operator="STARTSWITH"
        Conjunction="AND"
        Value=":VarNiedCode"
        IsBindVarValue="true"
        Required="Optional"
        UpperColumns="1"/>
    </ViewCriteriaRow>
  </ViewCriteria>
Edited by: Stefan1979 the 06.11.2009 20:45

Hello

the case sensitive search is controlled by the 'filterFeatures' on the af: column. Due to a bug that is fixed in the next Patch set 1 of JDeveloper 11 g R1, that the search is always case-sensitive.

Frank

Tags: Java

Similar Questions

  • Text that develop with the expandable text field

    I created a form using Livecycle Designer. I have 2 questions;

    1. how to create repeating fields.

    2 it is the text before and after the extensible text field, how the texts after the text growable field 'navigate' the text growable field. (when the user starts to fill the field expand the text after the demon of the text is expected to grow to the right as the text field.)

    3. how to create the text field in double capture / will reflect whatever the user type in a field in another text field without filling actually twice.

    See attached file

    Will be grateful if anyone can help! Thank you thank you =)

    For Q1 and 2 there is something called a field floating allow you to merge the data in a text block and reflow to remove all spaces in the block. This is available only when the data are merged on the form. This isn't an interactive field. Once the data are merged, it is transformed into a block of static text.

    For Q3, this is a case to assign a value to another.

    FieldNameofTargetField.rawValue = OriginalFieldName.rawValue;

    This code must be run on an event related to the original material. In general the exit event is used for this purpose. So when the user leaves the field, the target field will be updated with what was typed in the original field.

    Paul

  • bug using dbms_redefinition on table with the altered text index?

    I think I can found a bug when you use DBMS_REDEFINITION on a table with a text index that has been modified using ALTER INDEX index-name REBUILD PARAMETERS (REPLACE...). It seems that DBMS_REDEFINITION does not recognize the syntax with REPLACE and redefining fails. However, if I remove the text index and re-create it with all the parameters set during the initial creation and no ALTER INDEX command, then redo the redefinition, it works correctly. I have provided below a script that reproduces the problem, then use workaround mentioned. I have provided a copy of the script and executing the script separately, so that it can be copied and pasted to reproduce the problem. It is a simplification of a problem which has emerged over the diagnosis of a larger problem presented by someone on another forum, where the objective was to perform a loop on a group of tables that meet certain criteria and change some columns varchar2, nvarchar2 columns of these tables, where there are indexes in full text on the other columns in the tables and indexes have been changed using the syntax above. This seems to be a bug or am I missing something or is at - it an easier solution for the redefinition?

    -version:
    SCOTT@orcl_11gR2> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    
    5 rows selected.
    
    SCOTT@orcl_11gR2>
    -run the script:
    SCOTT@orcl_11gR2> -- table, data, altered text index:
    SCOTT@orcl_11gR2> CREATE TABLE t_test
      2    (col1  NUMBER PRIMARY KEY,
      3       col2  VARCHAR2 (10),
      4       col3  CLOB)
      5  /
    
    Table created.
    
    SCOTT@orcl_11gR2> INSERT INTO t_test VALUES (1, 'A', 'test data')
      2  /
    
    1 row created.
    
    SCOTT@orcl_11gR2> CREATE INDEX i1 ON t_test (col3) INDEXTYPE IS CTXSYS.CONTEXT
      2  /
    
    Index created.
    
    SCOTT@orcl_11gR2> ALTER INDEX i1 REBUILD PARAMETERS ('REPLACE SYNC (ON COMMIT)')
      2  /
    
    Index altered.
    
    SCOTT@orcl_11gR2> SELECT * FROM t_test WHERE CONTAINS (col3, 'test data') > 0
      2  /
    
          COL1 COL2       COL3
    ---------- ---------- ----------
             1 A          test data
    
    1 row selected.
    
    SCOTT@orcl_11gR2> -- redefinition that fails:
    SCOTT@orcl_11gR2> CREATE TABLE t_test_interim
      2    (col1  NUMBER,
      3       col2  NVARCHAR2 (10),
      4       col3  CLOB)
      5  /
    
    Table created.
    
    SCOTT@orcl_11gR2> DECLARE
      2    v_num_errors  NUMBER;
      3  BEGIN
      4    DBMS_REDEFINITION.CAN_REDEF_TABLE
      5        (USER, 'T_TEST', DBMS_REDEFINITION.CONS_USE_PK);
      6    DBMS_REDEFINITION.START_REDEF_TABLE
      7        (USER, 'T_TEST', 'T_TEST_INTERIM',
      8         'COL1 COL1,TO_NCHAR(COL2) COL2,COL3 COL3',
      9          DBMS_REDEFINITION.CONS_USE_PK);
     10    DBMS_REDEFINITION.SYNC_INTERIM_TABLE
     11        (USER, 'T_TEST', 'T_TEST_INTERIM');
     12    DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS
     13        (USER, 'T_TEST', 'T_TEST_INTERIM',
     14         DBMS_REDEFINITION.CONS_ORIG_PARAMS,
     15         TRUE, TRUE, TRUE, FALSE, v_num_errors, TRUE);
     16    DBMS_REDEFINITION.FINISH_REDEF_TABLE
     17        (USER, 'T_TEST', 'T_TEST_INTERIM');
     18  END;
     19  /
    DECLARE
    *
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-11000: invalid keyword REPLACE
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1364
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 2025
    ORA-06512: at line 12
    
    
    SCOTT@orcl_11gR2> -- clean up the mess:
    SCOTT@orcl_11gR2> DROP MATERIALIZED VIEW t_test_interim
      2  /
    
    Materialized view dropped.
    
    SCOTT@orcl_11gR2> DROP TABLE t_test_interim CASCADE CONSTRAINTS
      2  /
    
    Table dropped.
    
    SCOTT@orcl_11gR2> BEGIN
      2    DBMS_REDEFINITION.ABORT_REDEF_TABLE
      3        (USER, 'T_TEST', 'T_TEST_INTERIM');
      4  END;
      5  /
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> -- drop and recreate index with all parameters without altering:
    SCOTT@orcl_11gR2> DROP INDEX I1
      2  /
    
    Index dropped.
    
    SCOTT@orcl_11gR2> CREATE INDEX I1 ON T_TEST (COL3) INDEXTYPE IS CTXSYS.CONTEXT
      2  PARAMETERS ('SYNC (ON COMMIT)')
      3  /
    
    Index created.
    
    SCOTT@orcl_11gR2> -- redo redefinition:
    SCOTT@orcl_11gR2> CREATE TABLE t_test_interim
      2    (col1  NUMBER,
      3       col2  NVARCHAR2 (10),
      4       col3  CLOB)
      5  /
    
    Table created.
    
    SCOTT@orcl_11gR2> DECLARE
      2    v_num_errors  NUMBER;
      3  BEGIN
      4    DBMS_REDEFINITION.CAN_REDEF_TABLE
      5        (USER, 'T_TEST', DBMS_REDEFINITION.CONS_USE_PK);
      6    DBMS_REDEFINITION.START_REDEF_TABLE
      7        (USER, 'T_TEST', 'T_TEST_INTERIM',
      8         'COL1 COL1,TO_NCHAR(COL2) COL2,COL3 COL3',
      9          DBMS_REDEFINITION.CONS_USE_PK);
     10    DBMS_REDEFINITION.SYNC_INTERIM_TABLE
     11        (USER, 'T_TEST', 'T_TEST_INTERIM');
     12    DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS
     13        (USER, 'T_TEST', 'T_TEST_INTERIM',
     14         DBMS_REDEFINITION.CONS_ORIG_PARAMS,
     15         TRUE, TRUE, TRUE, FALSE, v_num_errors, TRUE);
     16    DBMS_REDEFINITION.FINISH_REDEF_TABLE
     17        (USER, 'T_TEST', 'T_TEST_INTERIM');
     18  END;
     19  /
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> DROP TABLE t_test_interim CASCADE CONSTRAINTS
      2  /
    
    Table dropped.
    
    SCOTT@orcl_11gR2> -- results:
    SCOTT@orcl_11gR2> DESC t_test
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     COL1                                               NUMBER
     COL2                                               NVARCHAR2(10)
     COL3                                               CLOB
    
    SCOTT@orcl_11gR2> COLUMN col3 FORMAT A10
    SCOTT@orcl_11gR2> SELECT * FROM t_test WHERE CONTAINS (col3, 'test data') > 0
      2  /
    
          COL1 COL2       COL3
    ---------- ---------- ----------
             1 A          test data
    
    1 row selected.
    
    SCOTT@orcl_11gR2> -- clean-up:
    SCOTT@orcl_11gR2> DROP TABLE t_test
      2  /
    
    Table dropped.
    
    SCOTT@orcl_11gR2>
    -script:
    -- table, data, altered text index:
    CREATE TABLE t_test
      (col1  NUMBER PRIMARY KEY,
       col2  VARCHAR2 (10),
       col3  CLOB)
    /
    INSERT INTO t_test VALUES (1, 'A', 'test data')
    /
    CREATE INDEX i1 ON t_test (col3) INDEXTYPE IS CTXSYS.CONTEXT
    /
    ALTER INDEX i1 REBUILD PARAMETERS ('REPLACE SYNC (ON COMMIT)')
    /
    SELECT * FROM t_test WHERE CONTAINS (col3, 'test data') > 0
    /
    -- redefinition that fails:
    CREATE TABLE t_test_interim
      (col1  NUMBER,
       col2  NVARCHAR2 (10),
       col3  CLOB)
    /
    DECLARE 
      v_num_errors  NUMBER;
    BEGIN 
      DBMS_REDEFINITION.CAN_REDEF_TABLE
        (USER, 'T_TEST', DBMS_REDEFINITION.CONS_USE_PK);
      DBMS_REDEFINITION.START_REDEF_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM',
         'COL1 COL1,TO_NCHAR(COL2) COL2,COL3 COL3',
          DBMS_REDEFINITION.CONS_USE_PK);
      DBMS_REDEFINITION.SYNC_INTERIM_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM');
      DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS
        (USER, 'T_TEST', 'T_TEST_INTERIM',
         DBMS_REDEFINITION.CONS_ORIG_PARAMS, 
         TRUE, TRUE, TRUE, FALSE, v_num_errors, TRUE);
      DBMS_REDEFINITION.FINISH_REDEF_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM');
    END;
    /
    -- clean up the mess:
    DROP MATERIALIZED VIEW t_test_interim
    /
    DROP TABLE t_test_interim CASCADE CONSTRAINTS
    /
    BEGIN 
      DBMS_REDEFINITION.ABORT_REDEF_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM');
    END;
    /
    -- drop and recreate index with all parameters without altering:
    DROP INDEX I1
    /
    CREATE INDEX I1 ON T_TEST (COL3) INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('SYNC (ON COMMIT)')
    /
    -- redo redefinition:
    CREATE TABLE t_test_interim
      (col1  NUMBER,
       col2  NVARCHAR2 (10),
       col3  CLOB)
    /
    DECLARE 
      v_num_errors  NUMBER;
    BEGIN 
      DBMS_REDEFINITION.CAN_REDEF_TABLE
        (USER, 'T_TEST', DBMS_REDEFINITION.CONS_USE_PK);
      DBMS_REDEFINITION.START_REDEF_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM',
         'COL1 COL1,TO_NCHAR(COL2) COL2,COL3 COL3',
          DBMS_REDEFINITION.CONS_USE_PK);
      DBMS_REDEFINITION.SYNC_INTERIM_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM');
      DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS
        (USER, 'T_TEST', 'T_TEST_INTERIM',
         DBMS_REDEFINITION.CONS_ORIG_PARAMS, 
         TRUE, TRUE, TRUE, FALSE, v_num_errors, TRUE);
      DBMS_REDEFINITION.FINISH_REDEF_TABLE
        (USER, 'T_TEST', 'T_TEST_INTERIM');
    END;
    /
    DROP TABLE t_test_interim CASCADE CONSTRAINTS
    /
    -- results:
    DESC t_test
    COLUMN col3 FORMAT A10
    SELECT * FROM t_test WHERE CONTAINS (col3, 'test data') > 0
    /
    -- clean-up:
    DROP TABLE t_test
    /

    No real workaround DBMS_REDEFINITION uses function DBMS_METADATA. GET_DDL() and a string of invalid parameter is returned due to known bugs when you use the ALTER INDEX REBUILD with parameter REPLACE; try to avoid changing the index with REPLACE if you export or use DBMS_REDEFINITION for this table/index.

    Note to change the text index metadata, to change the existing class preference, you can use the REPLACE METADATA, IE

    ALTER INDEX i1 REBUILD PARAMETERS ("replace metadata sync (on commit)" ");

    Will not rebuild the index so that your DOF is to rebuild the index

    ALTER INDEX i1 REBUILD PARAMETERS ('REPLACE SYNC (ON COMMIT)")

  • Subform with table with the expansion of fields - please help!

    I am a new user of LiveCycle Designer ES and need help with a form.  I made so many changes in the form I've now lost track and don't know where start set the following two questions:

    • The shape itself is a Master Page that needs repeating, based on the amount of data entered.  This is not the case.
    • In the form is a Table to the expansion of the fields.  That's when the last field is full that I need a new page created.
      • Also, as the table grows, it overwrites the footer, which is a subform.  The footer is set to have a top margin (. 25).

    Any help would be appreciated.  Thank you!

    It resembles a station of the cross.  See other thread here...

    http://forums.Adobe.com/thread/489453?TSTART=0

  • Please help me with the custom text field FormCalc

    There is someone online has done a very good thing for me - they helped me create a text field that would be of type 'this document has been printed on _' and include some day the pdf was printed on the employer's intranet site.

    I had a shortcut in my favorites and would click on it and place it on each new document that I needed on.

    Because the computer I was using suddenly fell down, can't get the details of how to set it up again. I have a pdf form that includes the box, but when I open it in LiveCycle, it's just empty.

    That's what I saved:

    < field h = mm "8,4935" name = "PrintedOn" w = "141,0398 mm" x = "-0,0001 mm" y = "0 mm" xmlns ="http://www.xfa.org/schema/xfa-template/2.5/" > ""
    < ui >
    < textEdit >
    < border hand = 'right' presence = "hidden" >
    <? templateDesigner styleId aped0? > < / border >
    < margin / >
    < / textEdit >
    < /UI >
    < police size = cast "18pt" = "Tahoma" weight = "bold" >
    < filling >
    < color value = "221,221,221" / >
    < / filling >
    < / make >
    < para hAlign = "center" vAlign = "middle" / >
    < link match = "none" / >
    < activity = "prePrint" ref = "$host" >
    < script >$ .rawValue = concat ("this document has been printed on:", num2date (date (), DateFmt (1))); < /script >
    < / event >
    < / field >

    I don't remember what to do to get this working.

    I use this text box "print on" ALL the time, and I need to know what to do to get back to work quickly.

    If there is someone who could help me, I could also send you a sample of a form which includes it - so you can see exactly what I mean.

    If someone could remember how to program this kind of thing in once again and save it in LiveCycle, then explain how I can put it on another computer so I'd really, REALLY appreciate it.

    ~ Chris

    PS - this one as I had put in place only prints print message per day on the first page. If she could somehow print on EACH page of the PDF file without me having to click and add it to each page individually, it would be better... but let's first!

    Hello

    The script is here. If you place a new textfield in the Master Page and put the following script in the event of pre-publication of the field:

    $ = concat("This document was printed on: ", num2date(date(), DateFmt(1)))
    

    The language is FormCalc.

    Please note that you don't need to go to the XML Source for this. Simply select the textfield object and open the Script Editor (in the Windows menu). Drag the bottom of the editor bar so that you can see a few lines, and then set the FormCalc language.

    Should work,

    Niall

  • Scroll bar with the dynamic text field?

    I have a dynamic text field, multi-line. I have attached a scrollbar to it using drag component / move.

    It is empty, but gets text thrown in through the appendText() method when the user clicks a button.

    It works, but if there are more lines which fits in the text field, the scroll bar does not "activate" and allow the user to scroll to see it all.

    I'm sure I'm missing something simple here, can someone please help. Thank you.

    Use the scroll bar update() method after text is added.

  • How to export data to excel that has 2 tables with the same number of columns and the column names?

    Hi everyone, yet once landed upward with a problem.

    After trying many things to myself, finally decided to post here...

    I created a form in form builder 6i in which clicking on a button, the data gets exported to the excel sheet.

    It works very well with a single table. The problem now is that I cannot do the same with 2 tables.

    Because the tables have the same number of columns and the columns names.

    Here are the 2 tables with column names:

    Table-1 (MONTHLY_PART_1) Table-2 (MONTHLY_PART_2)
    SL_NOSL_NO
    MODELMODEL
    END_DATEEND_DATE
    U-1U-1
    U-2U-2
    U-4U-4
    ..................
    ..................
    U-20U-20
    U-25U-25

    Given that the tables have the same column names, I get the following error :

    402 error at line 103, column 4

    required aliases in the SELECT list of the slider to avoid duplicate column names.

    So how to export data to excel that has 2 tables with the same number of columns and the column names?

    Should I paste the code? Should I publish this query in 'SQL and PL/SQL ' Forum?

    Help me with this please.

    Thank you.

    Wait a second... is this a kind of House of partitioning? Shouldn't it is a union of two tables instead a join?

    see you soon

  • update to column values (false) in a copy of the same table with the correct values

    Database is 10gr 2 - had a situation last night where someone changed inadvertently values of column on a couple of hundred thousand records with an incorrect value first thing in the morning and never let me know later in the day. My undo retention was not large enough to create a copy of the table as it was 7 hours comes back with a "insert in table_2 select * from table_1 to timestamp...» "query, so I restored the backup previous nights to another machine and it picked up at 07:00 (just before the hour, he made the change), created a dblink since the production database and created a copy of the table of the restored database.

    My first thought was to simply update the table of production with the correct values of the correct copy, using something like this:


    Update mnt.workorders
    Set approvalstat = (select b.approvalstat
    mnt.workorders a, mnt.workorders_copy b
    where a.workordersoi = b.workordersoi)
    where exists (select *)
    mnt.workorders a, mnt.workorders_copy b
    where a.workordersoi = b.workordersoi)

    It wasn't the exact syntax, but you get the idea, I wanted to put the incorrect values in x columns in the tables of production with the correct values of the copy of the table of the restored backup. Anyway, it was (or seem to) works, but I look at the process through OEM it was estimated 100 + hours with full table scans, so I killed him. I found myself just inserting (copy) the lines added to the production since the table copy by doing a select statement of the production table where < col_with_datestamp > is > = 07:00, truncate the table of production, then re insert the rows from now to correct the copy.

    Do a post-mortem today, I replay the scenario on the copy that I restored, trying to figure out a cleaner, a quicker way to do it, if the need arise again. I went and randomly changed some values in a column number (called "comappstat") in a copy of the table of production, and then thought that I would try the following resets the values of the correct table:

    Update (select a.comappstat, b.comappstat
    mnt.workorders a, mnt.workorders_copy b
    where a.workordersoi = b.workordersoi - this is a PK column
    and a.comappstat! = b.comappstat)
    Set b.comappstat = a.comappstat

    Although I thought that the syntax is correct, I get an "ORA-00904: 'A'. '. ' COMAPPSTAT': invalid identifier ' to run this, I was trying to guess where the syntax was wrong here, then thought that perhaps having the subquery returns a single line would be cleaner and faster anyway, so I gave up on that and instead tried this:

    Update mnt.workorders_copy
    Set comappstat = (select distinct)
    a.comappstat
    mnt.workorders a, mnt.workorders_copy b
    where a.workordersoi = b.workordersoi
    and a.comappstat! = b.comappstat)
    where a.comappstat! = b.comappstat
    and a.workordersoi = b.workordersoi

    The subquery executed on its own returns a single value 9, which is the correct value of the column in the table of the prod, and I want to replace the incorrect a '12' (I've updated the copy to change the value of the column comappstat to 12 everywhere where it was 9) However when I run the query again I get this error :

    ERROR on line 8:
    ORA-00904: "B". "" WORKORDERSOI ": invalid identifier

    First of all, I don't see why the update statement does not work (it's probably obvious, but I'm not)

    Secondly, it is the best approach for updating a column (or columns) that are incorrect, with the columns in the same table which are correct, or is there a better way?

    I would sooner update the table rather than delete or truncate then re insert, as it was a trigger for insert/update I had to disable it on the notice re and truncate the table unusable a demand so I was re insert.

    Thank you

    Hello

    First of all, after post 79, you need to know how to format your code.

    Your last request reads as follows:

    UPDATE
      mnt.workorders_copy
    SET
      comappstat =
      (
        SELECT DISTINCT
          a.comappstat
        FROM
          mnt.workorders a
        , mnt.workorders_copy b
        WHERE
          a.workordersoi    = b.workordersoi
          AND a.comappstat != b.comappstat
      )
    WHERE
      a.comappstat      != b.comappstat
      AND a.workordersoi = b.workordersoi
    

    This will not work for several reasons:
    The sub query allows you to define a and b and outside the breakets you can't refer to a or b.
    There is no link between the mnt.workorders_copy and the the update and the request of void.

    If you do this you should have something like this:

    UPDATE
      mnt.workorders     A      -- THIS IS THE TABLE YOU WANT TO UPDATE
    SET
      A.comappstat =
      (
        SELECT
          B.comappstat
        FROM
          mnt.workorders_copy B   -- THIS IS THE TABLE WITH THE CORRECT (OLD) VALUES
        WHERE
          a.workordersoi    = b.workordersoi      -- THIS MUST BE THE KEY
          AND a.comappstat != b.comappstat
      )
    WHERE
      EXISTS
      (
        SELECT
          B.comappstat
        FROM
          mnt.workorders_copy B
        WHERE
          a.workordersoi    = b.workordersoi      -- THIS MUST BE THE KEY
          AND a.comappstat != b.comappstat
      )
    

    Speed is not so good that you run the query to sub for each row in mnt.workorders
    Note it is condition in where. You need other wise, you will update the unchanged to null values.

    I wouold do it like this:

    UPDATE
      (
        SELECT
          A.workordersoi
          ,A.comappstat
          ,B.comappstat           comappstat_OLD
    
        FROM
          mnt.workorders        A      -- THIS IS THE TABLE YOU WANT TO UPDATE
          ,mnt.workorders_copy  B      -- THIS IS THE TABLE WITH THE CORRECT (OLD) VALUES
    
        WHERE
          a.workordersoi    = b.workordersoi      -- THIS MUST BE THE KEY
          AND a.comappstat != b.comappstat
      ) C
    
    SET
      C.comappstat = comappstat_OLD
    ;
    

    This way you can test the subquery first and know exectly what will be updated.
    This was not a sub query that is executed for each line preformance should be better.

    Kind regards

    Peter

  • How to compare the length of the data to a staging table with the definition of the base table

    Hello
    I have two tables: staging of the table and the base table.
    I get flatfiles data in the staging of the table, depending on the structure of the requirement of staging of the table and the base table (length of each column in the staging table is 25% more data dump without errors) are different for ex: If we have the city long varchar 40 column in table staging there 25 in the base table. Once data are discharged into the intermediate table that I want to compare the actual length of the data for each column in the staging table with the database table definition (data_length for each column of all_tab_columns) and if no column is different length that I need to update the corresponding line in the intermediate table which also has an indicator called err_length.

    so for that I use the cursor c1 is select length (a.id), length (b.SID) of staging_table;
    c2 (name varchar2) cursor is select data_length all_tab_columns where table_name = 'BASE_TABLE' and column_name = name;
    But we get atonce data in the first query while the second slider, I need to get for each column and then compare with the first?
    Can someone tell me how to get the desired results?

    Thank you
    Manoi.

    Hey, Marco.

    Of course, you can set src.err_length in the USING clause (where you can reference all_tab_columns) and use this value in the SET clause.
    It is:

    MERGE INTO  staging_table   dst
    USING  (
           WITH     got_lengths     AS
                     (
              SELECT  MAX (CASE WHEN column_name = 'ENAME' THEN data_length END)     AS ename_len
              ,     MAX (CASE WHEN column_name = 'JOB'   THEN data_length END)     AS job_len
              FROM     all_tab_columns
              WHERE     owner          = 'SCOTT'
              AND     table_name     = 'EMP'
              )
         SELECT     s.ename
         ,     s.job
         ,     CASE WHEN LENGTH (s.ename) > l.ename_len THEN 'ENAME ' END     ||
              CASE WHEN LENGTH (s.job)   > l.job_len   THEN 'JOB '   END     AS err_length
         FROM     staging_table     s
         JOIN     got_lengths     l     ON     LENGTH (s.ename)     > l.ename_len
                             OR     LENGTH (s.job)          > l.job_len
         )     src
    ON     (src.ename     = dst.ename)
    WHEN MATCHED THEN UPDATE
         SET     dst.err_length     = src.err_length
    ;
    

    As you can see, you have to hardcode the names of the columns common to several places. I swam () to simplify that, but I found an interesting (at least for me) alternative grouping function involving the STRAGG user_defined.
    As you can see, only the subquery USING is changed.

    MERGE INTO  staging_table   dst
    USING  (
           SELECT       s.ename
           ,       s.job
           ,       STRAGG (l.column_name)     AS err_length
           FROM       staging_table          s
           JOIN       all_tab_columns     l
          ON       l.data_length  < LENGTH ( CASE  l.column_name
                                              WHEN  'ENAME'
                                    THEN      ename
                                    WHEN  'JOB'
                                    THEN      job
                                       END
                               )
           WHERE     l.owner      = 'SCOTT'
           AND      l.table_name     = 'EMP'
           AND      l.data_type     = 'VARCHAR2'
           GROUP BY      s.ename
           ,           s.job
           )     src
    ON     (src.ename     = dst.ename)
    WHEN MATCHED THEN UPDATE
         SET     dst.err_length     = src.err_length
    ;
    

    Instead of the user-defined STRAGG (that you can copy from AskTom), you can also use the undocumented, or from Oracle 11.2, WM_CONCAT LISTAGG built-in function.

  • kindly tell how to use the unique value of a table with the index 0

    kindly tell how to use the unique value of a table with the index 0

    Hi
     
    Yep, use Index Array as Gerd says. Also, using the context help ( + h) and looking through the array palette will help you get an understanding of what each VI does.
     
    This is fundamental LabVIEW stuff, perhaps you'd be better spending some time going through the basics.
     
    -CC
  • LOV cascading if I don't have only one table with the customer name and the name of the product in the ADF.

    Hi Please help me how to use cascade, if I don't have only one table with the customer name and the name of the product in the ADF... I use Jdeveloper 11.1.

    For the client, I used customer VO with client list to fill but to populate the product that I use bind variable PrODUCT_NAME select distinct from TABLE where client_name =: bindCustomer

    so first of all, I need to set the variable of liaison on behalf of the selected customer.

    Can you please tell me how to set this variable binding in this case.

    After you set the LOV to your product attribute, correspondting VO in the LOV will appear under view accessors.

    Change the accessor of the view, you will see the variable binding. Set its value to the customer field of the parent object.

    Visit this link: https://www.youtube.com/watch?v=nXwL2_RP7AQ

    Kind regards

    Elias.

  • Fill a table with the results of the refresh groups

    Hello world

    I need a little help.

    I'm working on an Oracle 10.2.0.4 on windows.

    I have a table I created like this:
    Table name: DIM_REPLICA

    COD_SEZ VCHAR2 (2)
    NOME_SEZ VCHAR2 (20)
    FLAG TANK (1)
    DATE OF D_REPLICA

    This DB I have 210 discount groups running every night. I need fill this table with the results of the refresh groups.

    So when the refresh for example called ROME group runs I need to write on the table the name ROME in the field "NOME_SEZ", a Y or N if the refresh Group has worked in the field of the INDICATOR and LAST_DATE refresh force ran into the field of the D_REPLICA. The COD_SEZ field is a code that I get other things. It is not necessary for the moment. I can add it myself on my own.

    Can someone help me please?

    I was looking on the tables SYS DBA_JOBS and DBA_REFRESH these data, but I don't know what to take and how to fill the table. Trigger? Procedure? Any help will be great!

    Thank you all in advance!

    This forum is for SQL * PLus, questions and your question is about general issues Oracle. You will get a better response by posting your question in another forum - probably the General database instance.

    Please close this thread and start over in another forum.

  • How the values to insert into the table with the command insertion

    Dear all
    can someone tell me how the values to insert into the table with the command insert, I want to say I always use command insert behind my forms on what shutter release button press the button of my save, but today I had a form of 6i, where controls (textbox, combo, etc.) are delineated with directly the table with I guess than the Properties Windows , I created 3 columns in tand 3 text on forms fields, now kindly tell me how to do this fields to fill and do not insert command, I mean directly defined with table column



    Please help me its urgent

    Hello

    If the block is based on your database table, just committed the shape, then changes will be applied to the database.

    François

  • Drop a large number of tables with the same prefix

    Hello

    can you help me to make a script to move all the tables with the same prefix = TEST_LINK_?

    Thank you very much.
    Crystal

    Hi crystal,

    Here's something to start. It does not all FK constraints on those tables and assumes that the executor is the owner.

    declare
      pstmt  constant varchar2(255) := 'drop table :t purge';
      vstmt varchar2(255);
    begin
    for rec in (select table_name
                  from user_tables
                 where table_name like 'TEST_LINK\_%' escape '\')
       loop
          vstmt := replace(pstmt, ':t', rec.table_name);
          dbms_output.put_line(vstmt || ';');
    --      execute immediate vstmt;
       end loop;
    end;
    /
    

    Concerning
    Peter

  • How to create the table with the rows and columns using the layout?

    One of my friends advised me to put my site on the mode of provision as it is better than the standard as he said
    but I couldnot make an ordinary table with the rows and columns in mode available th
    y at - there someone who can tell me how to?
    Thank you very much

    Wednesday, April 18, 2007 21:01:38 + 0000 (UTC), "Mr.Ghost".
    wrote:

    > A friend of mine advised me to put my whole site on the mode of disposal as its
    > better than standard, as he says

    Your friend won't. Don't listen to him any more. Mode of disposal creates
    very fragile and rigid code pauses at the first opportunity.

    Gary

Maybe you are looking for