value of the column in my data base

Hi Master,

I'm running the query to find the value of a column in my diagram below. But when I change user_tab_columns in all_tab_columns, I get the error message.

I use 11.2.0.1 Oracle version. without the help of xml, we can get the desired result? Please help me.

Select table_name, column_name

(select rownum, table_name, column_name,

dbms_xmlgen. GetXml ('select 1 from "'|") table_name | " » où « ' || column_name |' ("=" & val "') x

from all_tab_columns where data_type = "VARCHAR2".

) where length (x)! = 0 ;

ORA-19202: an error has occurred in the processing of XML

ORA-00942: table or view does not exist

ORA-06512: at "SYS." DBMS_XMLGEN", line 176

ORA-06512: at line 1.

How to avoid this error? and how do I get the power requested by the query above? Please notify.

Concerning

AR

Unable to reproduce this scenario, give it a try with this and check if works...

SELECT owner, table_name, column_name
  FROM (SELECT ROWNUM,
               owner,
               table_name,
               column_name,
               CONVERT (
                  DBMS_XMLGEN.getxml (
                        'select 1 from "'
                     || owner
                     || '"."'
                     || table_name
                     || '" where "'
                     || column_name
                     || '" =''&val'''),
                  'UTF8',
                  'WE8MSWIN1252')
                  AS x
          FROM all_tab_columns
         WHERE data_type = 'VARCHAR2' AND owner ='SCOTT')
WHERE LENGTH (X) != 0;

See you soon,.

Manik.

Tags: Database

Similar Questions

  • Dynamically by passing the values in the columns

    Hi all

    I'm trying a pl/sql block that take a string and execute it dynamically. Suppose that here is the string

    M_COL: = Q' [(Code_P = > ': DEPTNO', P_CODE_TYPE = > "ÉTAT")]';

    Now try to run. using below

    M_STR: = 'SELECT CHK_DEPT ' | M_COL | ' FROM EMP WHERE EMPNO = "7499" ';


    RUN IMMEDIATELY M_STR

    IN M_DATE;

    Now what I want is M_STR vairable executed as

    SELECT CHK_DEPT (Code_P = > DEPTNO, P_CODE_TYPE = > 'STATE') FROM EMP WHERE EMPNO = '7499'

    Instead of

    SELECT CHK_DEPT (Code_P = > 'DEPTNO', P_CODE_TYPE = > 'STATE') FROM EMP WHERE EMPNO = '7499'

    another other way in the Code_P column DEPTNO value parameter must be passed. Also note that the DEPTNO column in the M_COL string is Dynamic.i.e

    M_COL: = Q' [(Code_P = > ': DEPTID', P_CODE_TYPE = > "ÉTAT")]'; OR

    M_COL: = Q' [(Code_P = > ': EMP_ID', P_CODE_TYPE = > "ÉTAT")]';

    Any suggestions, please share with me.

    And also, please don't bother much about the data and the output of function. If I get a way to pass the value of the column in function, my problem is solved.

  • Partial Page rendering - refresh value in the column

    Hi gurus of the OFA.
    I created a page of creation and followed the tutorial on Partital page made by creating a view PVO object and I am able to make the "EmployeeNumber" / "Location" column true false GOLD according to the value of another field (area).

    The 'TypeMonitored' (choice of message) has 2 values (area/employee). If the user selects the 'zone' then "EmployeeNumber" column should be hidden and if the user selects 'Employee', then the 'Place' column should be hidden. It works very well.

    My problem is if the user has selected 'Employee' in the 'TypeMonitored' of poplist and registered the "EmployeeNumber" and then immediately again if the user selects "Domain" of the "TypeMonitored" of poplist and enters the 'place' (since the site is now visible to the user) and click on Save and then the record is get recorded with the two values. I need to have the value of the column of 'Employee' to be empty in this case.

    Basically need to SETTING / erases the value of EmployeeNumber before any record in the database.

    Any help would be appreciated to greatlly. Please let me know if you want more details.

    Thank you
    Mir

    Here is my Code AMImpl
    ===============
    package lac.oracle.apps.lac.lacempexposure.server;

    Import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    Import oracle.apps.fnd.framework.server.OAViewObjectImpl;
    Import oracle.jbo.Row;
    Import oracle.apps.fnd.framework.OAViewObject;
    Import oracle.jbo.Transaction;

    Import oracle.jbo.domain.Number;
    Import oracle.apps.fnd.framework.OARow;
    Import oracle.apps.fnd.common.MessageToken;
    Import oracle.apps.fnd.framework.OAException;

    // ---------------------------------------------------------------------
    -File generated by Oracle ADF business components Design-time.
    -Custom code can be added to this class.
    -WARNING: do not change the methods generated method signatures.
    // ---------------------------------------------------------------------
    SerializableAttribute public class LacEmpExposureAMImpl extends OAApplicationModuleImpl {}

    / * This is the default constructor (do not remove)
    */
    public LacEmpExposureAMImpl() {}
    }

    /*
    *****************************************************************
    * Initializes the application transient VO properties.
    *****************************************************************
    */
    public void init()
    {

    System.out.println ("in LACEmpExposureAMImpl.java IN init");
    System.out.println (LacTypeMonitored);

    OAViewObject appPropsVO = (OAViewObject) findViewObject ("LacExpCreatePVO1");

    If (appPropsVO! = null)
    {
    Not reset the VO unless necessary. Note that this method
    not trying to query the database for your with no SELECT statement
    and only transient attributes.

    If (appPropsVO.getFetchedRowCount () == 0)
    {

    Set the mapping size extraction to 0 to a VO in memory
    It prevents to try the query lines. The call
    executeQuery() ensures that the lines are not lost after
    validation under (workaround for known issue of BC4J) operation.

    appPropsVO.setMaxFetchSize (0);
    appPropsVO.executeQuery ();

    You must create and insert a line in the original Version, before you start
    definition of the properties.

    appPropsVO.insertRow (appPropsVO.createRow ());
    Set the primary key for this single-rwo VO.
    Line OARow = (OARow) appPropsVO.first ();
    row.setAttribute ("RowKey", new Number (1));
    }
    } / / Initialization of application VO properties (and the user interface) based on the
    Tracking to default value set on the underlying object Type.


    handleTypeMonitoredChangeEvent();

    } / / end of init()


    /*
    * *******************************************************
    Manages the poplist TypeMonitored changes to set the
    * application properties value of PRR VO
    * *******************************************************
    */

    Public Sub handleTypeMonitoredChangeEvent()
    {
    Get the properties of special application, einreihig, and make the
    First (only) current line.

    OAViewObject vo = (OAViewObject) findViewObject ("LacExpCreatePVO1");
    Line OARow = (OARow) vo.first ();

    Get the value of the attribute of the object from view with the code TypeMonitored


    OAViewObject LacEmpExposureCreateVO = (OAViewObject) findViewObject ("LacEmpExposureVO1");
    OARow LacEmpExposureCreateRow = (OARow) LacEmpExposureCreateVO.getCurrentRow ();
    String LacTypeMonitored = (String) LacEmpExposureCreateRow.getAttribute ("TypeMonitored");


    System.out.println ("in LACEmpExposureAMImpl.java IN handleTypeMonitoredChangeEvent");
    System.out.println (LacTypeMonitored);
    row.getAttribute ("LocationMonitoredRender");
    System.out.println (Row.GetAttribute ("LocationMonitoredRender"));


    If (("Personal".equals (LacTypeMonitored)))
    {
    row.setAttribute ("LocationMonitoredRender", Boolean.FALSE);
    row.setAttribute ("EmployeeNumberRender", Boolean.TRUE);
    row.setAttribute ("FullNameRender", Boolean.TRUE);

    }
    else if (("Area".equals (LacTypeMonitored)))
    {

    row.setAttribute ("LocationMonitoredRender", Boolean.TRUE);
    row.setAttribute ("EmployeeNumberRender", Boolean.FALSE);
    row.setAttribute ("FullNameRender", Boolean.FALSE);
    }

    } / / handleTypeMonitoredChangeEvent()



    / * Main sample for debugging code of business using the tester components.
    */
    Public Shared Sub main (String [] args) {}
    launchTester ("lac.oracle.apps.lac.lacempexposure.server", / * name of the package * /)
    ("LacEmpExposureAMLocal" / * Configuration name * /);
    }

    / * Getter of the container for LacEmpExposureVO1
    */
    public OAViewObjectImpl getLacEmpExposureVO1() {}
    return (OAViewObjectImpl) findViewObject ("LacEmpExposureVO1");
    }

    / * Getter of the container for EmployeeNamesLovVO1
    */
    public OAViewObjectImpl getEmployeeNamesLovVO1() {}
    return (OAViewObjectImpl) findViewObject ("EmployeeNamesLovVO1");
    }

    / * Getter of the container for MonitoringTypeVO1
    */
    public OAViewObjectImpl getMonitoringTypeVO1() {}
    return (OAViewObjectImpl) findViewObject ("MonitoringTypeVO1");
    }

    / * Getter of the container for LacParameterMonitoredVO1
    */
    public OAViewObjectImpl getLacParameterMonitoredVO1() {}
    return (OAViewObjectImpl) findViewObject ("LacParameterMonitoredVO1");
    }

    /*
    *******************************
    * Creates a new record of the exhibition
    *******************************
    */
    Public Sub CreateLacEmpExposure()
    {
    OAViewObject vo = (OAViewObject) getLacEmpExposureVO1 ();

    By coding standards, it is the right way of
    initialize a VO that is used for queries and inserts.
    See the objects in view in detail in the developer's Guide can do for
    Additional information.

    System.out.println ("in LACEmpExposureAMImpl.java IN CreateLacEmpExposure");

    If (!) VO.isPreparedForExecution ())
    {
    vo.executeQuery ();
    }
    Line = vo.createRow ();
    vo.insertRow (row);
    Required by OA Framework model M69 coding standards

    row.setNewRowState (Row.STATUS_INITIALIZED);

    } / / end CreateLacEmpExposure


    /*
    *****************************************************************
    * Performs a rollback, including the database and the middle-tier
    *****************************************************************
    */
    Public Sub rollbackLacEmpExposure()
    {
    Transaction txn = getTransaction();

    This small optimization ensures that we do not have persorm a restore
    If you have not to.

    If (txn.isDirty ())
    {
    TXN. Rollback();
    }
    } / / end rollbackLacEmpExposure()

    / * Getter of the container for LacEmpExposureLOVDataVO1
    */
    public OAViewObjectImpl getLacEmpExposureLOVDataVO1() {}
    return (OAViewObjectImpl) findViewObject ("LacEmpExposureLOVDataVO1");
    }

    /*
    * *****************************
    * Commits the transaction
    * *****************************
    */
    public void Apply()
    {
    getTransaction () .commit ();
    } / / end apply()

    / * Getter of the container for LacExpCreatePVO1
    */
    public OAViewObjectImpl getLacExpCreatePVO1() {}
    return (OAViewObjectImpl) findViewObject ("LacExpCreatePVO1");
    }


    /*
    ***********************************************************************
    * Initializes the request of employee details for the Update Page.
    ***********************************************************************
    */
    public void initDetailsUpdate (String EmployeeNumber,
    String FullName,
    String RecordSeq)
    {

    System.out.println ("in LACEmpExposureAMImpl.java IN initDetailsUpdate");

    System.out.println ("LACEmpExposureAMImpl == > EmployeeNumber in initQueryUpdate is:" + EmployeeNumber);
    System.out.println ("LACEmpExposureAMImpl == > FullName in initQueryUpdate is:" + FullName);
    System.out.println ("LACEmpExposureAMImpl == > RecordSeq in initQueryUpdate is:" + RecordSeq);

    OAViewObjectImpl vo = getLacEmpExposureVO1();

    LacEmpExposureEditVOImpl vo = (LacEmpExposureEditVOImpl) getLacEmpExposureEditVO1 ();


    OAViewObject vo = (OAViewObject) getLacEmpExposureVO1 ();

    If (vo is nothing)
    {
    MessageToken [] errTokens = {new MessageToken ("parameter", "LacEmpExposureVO1")};
    throw new OAException ("AK", "FWK_TBX_OBJECT_NOT_FOUND", errTokens);
    }

    ToL InitQueryUpdate (EmployeeNumber, FullName, RecordSeq);

    Line row = vo.first ();

    vo.setCurrentRow (row);



    /*
    Since we will interview a single row with a primary key value, we
    can use the findByKey method, which first checks the cache of BC4J
    and if it does not find one matching row, it will put forward a request for help
    the given key and retrieve it from the database.
    String [] keys = {employeeNumber};
    Line lines [] = vo.findByKey (new Key (keys), 1);

    You must set the current line, or the details page will not display any
    data. When you explicitly query data, you don't have to do it.

    If (rows! = null)
    {
    vo.setCurrentRow(rows[0]);
    }
    */

    } / / end initDetails()


    / * Getter of the container for LacEmpExposureEditVO1
    */
    public LacEmpExposureEditVOImpl getLacEmpExposureEditVO1() {}
    return (LacEmpExposureEditVOImpl) findViewObject ("LacEmpExposureEditVO1");
    }
    } / / end of class LacEmpExposureAMImpl

    Hello

    In your LacTypeMonitored / / I guess it will fire when you change the value of employee poplist form in area
    Add logic for null value, the value of the employee
    If (("Area".equals (LacTypeMonitored)))
    {

    row.setAttribute ("LocationMonitoredRender", Boolean.TRUE);
    row.setAttribute ("EmployeeNumberRender", Boolean.FALSE);
    row.setAttribute ("FullNameRender", Boolean.FALSE);

    Change the attribute used to null
    (OARow) LacEmpExposureCreateVO.getCurrentRow () .setAttribute ("", null);

    }

    Let me know that it works.

    Thank you

    With respect,
    Kali.
    OSSI.

  • value of the column at a title?

    Gurus,

    How is a product a report with one of the value of the column indicated on the title?

    example:

    Funding for the year - 2010 report (2010 is a column value)

    I can get a report using the Wizard but am scratching my head on how to implement this year on the title. Can you help or point me to an example? enjoy your time.




    Saidou

    If the year is passed as a parameter, simply create a field in the margin with respect to this parameter. If you read first the date of the db, so in e trigger BEFORE-REPORT extract the value in a parameter

  • Disable the navigation based on the value of the column?

    Hello

    When you activate the navigation I don't want the hyperlink in navigation is enabled for the particular data values in the column of the query.

    For example in my request Req_A I have column A, which has enabled another report of navigation. Column A has the following values 'ABC' and 'XYZ' "TUV". Can I some how disable/remove navigation links where that value is "TÜV"?

    Hello

    You now use standard column navigation. Instead, you must create a Case statement and use [Url GO | http://download.oracle.com/docs/cd/E12096_01/books/AnyWebAdm/AnyWebAdm_APIWebIntegrate6.html#wp1005251] feature.

    Use a URL for the values you want to naviagate on. Otherwise, just show the value.

    Good luck

    Daan Bakboord
    http://obibb.WordPress.com

  • Aggregated value of the column in which referencing Clause

    Hello-

    I am trying to determine how I can accomplish the following the most simple and effective way.

    Among other things, I select the next value in my table:
    max(received_date) as last_received_date
    I also need to assess the value of 'last_received_date' as a condition in my where clause. However, I can't refer to my value in the column alias 'last_received_date', and when trying to evaluate max (received_date) in where clause, I get the error 'group feature is not permitted here.

    Does anyone know of a good workaround?

    Thank you
    Christine

    Hello

    Maybe you can use the HAVING clause:

    Example:

    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    
    SQL>
    SQL> WITH DATA as (
      2  select to_date('10/02/2009', 'dd/mm/yyyy') as received_date from dual union all
      3  select to_date('10/01/2009', 'dd/mm/yyyy') as received_date from dual union all
      4  select to_date('14/02/2009', 'dd/mm/yyyy') as received_date from dual union all
      5  select to_date('11/01/2009', 'dd/mm/yyyy') as received_date from dual union all
      6  select to_date('15/02/2009', 'dd/mm/yyyy') as received_date from dual union all
      7  select to_date('13/02/2009', 'dd/mm/yyyy') as received_date from dual
      8  )
      9  select max(received_date) from data having max(received_date) > to_date('14/02/2009', 'dd/mm/yyyy');
    
    MAX(RECEIVED_DATE)
    ------------------
    15/02/2009
    
    SQL>
    

    Kind regards

  • need to update the value of the column automatically (exists and the new value)

    Hello

    (1) I Segment1, Segment2, Segment3, Segment4, item_status (new column modified in the Temp table)

    Must update the form OFA and the DB Temp table item_status value in the column when I click APPLY to SAVE the Inserted records in the DB table and form and must register the mtl_system_items_b Segment1, Segment2, Segment3, Segment4 in which the condition

    Note: need to update automatically item_status for existing and new inserted records in the Table and the form

     Serializable[] param = {Segment1, Segment2, Segment3, Segment4
                       };
                       am.invokeMethod("InsertRecord", param);
                       row.setAttribute("SelectFlag", "N");
    

    Thank you

    Renon,

    When you write code, try to understand what makes each line. (If you don't understand all the lines, feel free to ask)

    row.setAttribute ("ItemStatus", row.getAttribute ("ItemStatus"));

    What do you think that the above line done? You try to get the value of the attribute and trying to put the same value. How is it, that will have an impact?

    You need to do 2 things.

    1. change the insertRecord method and the State of return of this method.

    Change the definition of the function:

    public String InsertRecord (String itemstyle, String itemcust, String itemsize, String itemcolor, String ordrno,

    String desc)

    Add a return statement at the end after validation.

    TR.Commit ();

    return the situation;

    }

    2 accept that status in CO and set the value to the attribute details VO.

    String status = (String)am.invokeMethod ("InsertRecord", param);

    row.setAttribute ("ItemStatus",status);

    I hope this helps.

    See you soon

    AJ

  • update line and reset the value of the column

    I have table (CORS_MTR) with 3 columns...

    SEQ ID of the EPR the ID of the child / / desc
    100221one
    101222two

    new entry as 1 number , that means change the flow of child #

    102223three

    When I enter the new line in number of children 1 instead of 2 and then the values of the column (child id, desc) another need to be reset as...

    SEQ ID of the EPR the ID of the child / / desc
    100222two
    101221one
    102223three
    103224four
    SEQ PRT_ID CHILD_ID DESC_
    100 22 1 one
    101 22 2 two
    102 22 3 three

    declare

    number of p_seq: = 103;

    number of p_prt_id: = 22;

    number of p_child_id: = 1;

    p_desc varchar2 (25): = 'a ';

    Start

    Update cors_mtr

    set seq = case when child_id = p_child_id

    then seq + 1

    other seq - 1

    end

    where prt_id = p_prt_id

    and child_id (p_child_id, p_child_id + 1);

    insert into cors_mtr (seq, prt_id)

    values(p_seq,p_prt_id);

    Update cors_mtr

    Set child_id = (select max (child_id) + 1 of the cors_mtr).

    desc_ = (select to_char (to_date (max (child_id) + 1, 'J'), 'jsp') of cors_mtr)

    where child_id is null.

    end;

    SEQ PRT_ID CHILD_ID DESC_
    100 22 2 two
    101 22 1 one
    102 22 3 three
    103 22 4 four

    Concerning

    Etbin

  • Change quick values to 'ALL' of 'all values in the column.


    Hello

    I want to change the 'all values in the column' value for 'all' in the quick view of dashboard.

    I went to the location following: < MW_HOME > / Oracle_BI1/bifoundation/web/msgdb/l_en/messages /.

    But I am unable to determine which xml file to be changed.

    Help, please.

    Just in case where to check Srinivasan Software Solutions Pvt.Ltd.: [OBIEE 11 g] customization invites "All THE values in column" Custom value

  • How to display the value of the column

    Oracle 10g on Linux

    I want to display the value of the id column in the table of www if count (distinct id) is 1. The following query is fine except that it does not display the value of the column ID help, please.
    SELECT count(distinct id)
                   FROM www c
                  WHERE C.x_code IN (SELECT D.x_code
                                                     FROM www_app d
                                                    WHERE d.y_code = '1151299386')
                  having count(distinct id) = 1                                                

    I think you can use MAX in this case

    SELECT max(id)
                   FROM www c
                  WHERE C.x_code IN (SELECT D.x_code
                                                     FROM www_app d
                                                    WHERE d.y_code = '1151299386')
                  having count(distinct id) = 1
    
  • How can I replace the value of the column with a particular value in SQL

    Hi all

    Is someone can you please tell me how can I format my output with the replacement of a column value with a specific value that really depends on the current value of the column

    I am executing the following SQL statement

    Select state, count (id) from < table_name > where composite_dn = < composite_dn_name > Group by State;
    My current performance is:

    State Instance number
    1 3
    3 28

    I want to replace the value in the State column as follows

    No.OfInstances State
    3 filled
    28 faulted

    I want '1' to be reppaced of 'Done' and '3' is replaced by 'Faulted. '

    Is is possible with SQL or PL/SQL, if it is then how I can achieve this required. Help, please!

    Thanks in advance!

    Published by: Roshni Shankar on October 27, 2012 12:38 AM

    Hi Claude,.

    I guess this CASE clause can be simulated by a DECODE and also it is very easy to use.
    See - http://www.techonthenet.com/oracle/functions/decode.php

    select decode(t1.state,t2.state_id,t2.state_name), t1.count_id
    from  t2, (select state,count(id) count_id
     from 
     where composite_dn= 
    group by state) t1
    where t1.state = t2.state_id;
    

    HTH
    Vanessa B.

    Published by: Vanessa B on October 27, 2012 14:02
    -link added

    Published by: Vanessa B on October 27, 2012 14:19
    -added code sample

  • How to find if the DEFAULT VALUE of the COLUMN is stored as metadata?

    Hello
    I am using Oracle 11 g enhanced functionality add a COLUMN. Adding new columns with the DEFAULT values and unconstrained NULL is no longer requires that the default value in all existing records.
    Sometimes, we change DB columns not NULL with default with the DEFAULT value null. This operation "materialize" the default for the column.
    Y at - it an easy way (see Dictionary) how to find the default value of the COLUMN is stored as metadata or 'materializes '?
    Thank you. Filip

    Version of Oracle RDBMS: Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Look at the table SYS COL$. He has a column called PROPERTY.

    It will have the magic number 1073741824 for columns that have been added by using this new feature...

  • Add numeric value in the column in the Table

    Hello
    My problem:
    I have a VO with a numeric attribute (Sal). This VO is present in a table in a JSF Page.
    I need to add a numerical value to the value of the column.

    I have try it with #{row.bindings.Sal.attributeValue * 2} or #{rank. SAL + 2} or #{rank. Sal.inputValue + 2} but I get an error.

    Can someone help me?

    Thank you

    11.1.3 JDev

    Hello

    one option would be to use a transitional attribute in the VO to calculate math or to fill in the field column of a managed bean. You can point the field for the column to a property of the managed bean (say sumSal). In this getSumSal() method you

    1. use ELContext and ValueExpression ExpressionFactory to resolve the reference #{line} (you can cast oracle.jbo.domain.Row
    2. call the row.get ("attribute_name") to access the value of the field
    3 compute and return the value to display in the table

    Note that using a transitional attribute may be easier to achieve and easier to reuse in other uses of the VO. However, you will have options

    Frank

  • How to use the prompt value in the column of the report

    Hello

    I have a quick report column which is 'Adj Type' that contains values 10,20,30, and when the user selects Adj Type = 10, this value should be passed on to the column of the report.

    For example. Value in column 1 is 10 and this should multiple with the prompt value and production is expected to be 10 * 10.

    Ideas how to capture the prompt values in the column of the report for the calculation.

    Hi hsekar,

    (1) declare a presentation online in the section variable set Variable--> Variable--> P_var presentation

    (2) in Fx Table_name. Your_column * @{P_Var}

    @{P_var} {20} (20 is the default, it replaces when a user selects the value in the command prompt

    Thank you
    Saichand.v

  • Showing the value of the column in the custom alert

    Hi all

    I want to show the value of the column with the message the user defined alert. Have someone to help me with this problem?


    Arif

    This is the only code that you use for the alert. This code is just to set the alert message. Use the complete as code...

    DECLARE
     vAlert NUMBER;
    BEGIN
      set_alert_property('ALERT_TO_VERIFY',ALERT_MESSAGE_TEXT, 'Your Form has successfully submitted and your Reference id is '||:USERCREATION.REF_NO);
      vAlert:=SHOW_ALERT('ALERT_TO_VERIFY');
    END;
    

    -Clément

Maybe you are looking for