How null out an article based on a column of data before posting?

I use Apex 3.2

I have a question that is based on the database column. My client wants me 'white out', the question which it is displayed so that the user will have to enter a new value instead of the one that is in the database.

I tried to use a calculation "before the zone" to the element the value NULL. I can see the value prepares in debugging after extraction of the line took place, but when the item is displayed, it contains the value of the database, not my calculated valuie.

I also tried using a field of text unsourced and then doing a submit after calculation to set the value of the element in a column of data from there, but no luck that way either.

Also tried emptying the cache memory point, but I think it happens much too early.

There must be a simple way to do...

Any suggestion?

No problem user486652 (name?).

Yes, the $s function is one of the ApEx of built-in them - to see the ApEx documentation under the API, the Javascript API reference and you will find a variety of built-in functions that make all sorts of things. For Javascript, in general, take a look at www.w3schools.com for some really good reference material and tutorial - I use it constantly.

OK, if you want to set the browser field to empty once the page loaded. Since it is an event of the page, it is not something that fires for a form field element, if you do not want the code here. ApEx 3.2, change the attributes of the page, and you will see a setting called "Attribute of HTML Body". You'll see a helpful note ball below the setting: this is the place to add onload events. The appropriate syntax will be:

onload="$s('P2_REMEDY_TICKET', '');"

Once the ApEx puts everything together and the rendering of the page, copy the following code will tell the browser to perform this $s function after the page load.

But be aware - if you take a look at aid for that setting, you will see that it mentions that this will only work if your page template includes the #ONLOAD substitution string #. Do not know if all pages provided by ApEx models have already #ONLOAD #, but every one I've used. If your code still does not work, check your page tempate. In the area of definition, under header, you should see a body with something like tag:

...
...
...

If it is, your page template supports the HTML Body attribute. If your body tag does not have a #ONLOAD #, add it.

Hope this helps,
John

If you find this information useful, please indicate the 'useful' or 'correct' post so that others benefit. *

Tags: Database

Similar Questions

  • How to get the values based on the most recent date

    Oracle Version 8i



    How to get the new_value based on the most recent date

    SELECT max (MODIFIED_ON), the Group LOG_ITEM_CHARACTERISTICS by MODIFIED_ON new_value - does not

    Please, someone help me
    CREATE TABLE LOG_ITEM_CHARACTERISTICS
    (
      CHAR_LOG_ID          NUMBER(10)               NOT NULL,
      PIRM_ID              VARCHAR2(8)              NOT NULL,
      CONSTANT_FLAG        VARCHAR2(1),
      CHARACTERISTIC_NAME  VARCHAR2(25)             NOT NULL,
      TYPE_NAME            VARCHAR2(10)             NOT NULL,
      NEW_VALUE            VARCHAR2(3000),
      UOM                  VARCHAR2(10),
      MODIFIED_BY          VARCHAR2(30),
      MODIFIED_ON          DATE
    )
    
    SET DEFINE OFF;
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187376, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '1', 'AMPS', 'EMPXD88', TO_DATE('10/25/1999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187377, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMPXD88', TO_DATE('09/22/1998 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187378, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '0', 'AMPS', 'EMDXB88', TO_DATE('09/22/1998 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187384, '0307490N', 'N', 'OUTPUT CURRENT', 'PS2030/WVL', '2', 'AMPS', 'EMAXC29', TO_DATE('11/10/2000 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (187385, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55.1', 'VOLTS', 'EMAXC29', TO_DATE('10/19/2001 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_ON)
     Values
       (2400742, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '2', 'AMPS', TO_DATE('10/19/2001 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (574093, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '2', 'AMPS', 'EMCTH88', TO_DATE('12/13/2002 11:55:16', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (574094, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMCTH88', TO_DATE('12/13/2002 11:55:16', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131486, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131487, '0307490N', 'N', 'LAST MEASURED DATE', 'PS2030/WVL', '16-12-04', 'DD/MM/YY', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131488, '0307490N', 'Y', 'POWER SUPPLY', 'PS2030/WVL', 'ESSENTIAL', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (3131489, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMCTH88', TO_DATE('12/16/2004 14:31:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (4759086, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (4759087, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '54.9', 'VOLTS', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (4759088, '0307490N', 'N', 'LAST MEASURED DATE', 'PS2030/WVL', '14/11/07', 'DD/MM/YY', 'EMRCT88', TO_DATE('11/15/2007 14:33:03', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646012, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '5', 'AMPS', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646013, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646014, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646015, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646016, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 12:56:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646057, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646058, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6646059, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'null', 'PAUL DEVERILL', TO_DATE('01/06/2011 13:03:18', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648577, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '6', 'AMPS', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648578, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648579, '0307490N', 'Y', 'YR ROUTINES REQUIRED', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:35:45', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648580, '0307490N', 'Y', 'BATT TEST SET AT 3M', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:36:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648581, '0307490N', 'Y', 'CAP ALARM INHIBITED', 'PS2030/WVL', 'NULL', 'EMPXD88', TO_DATE('01/07/2011 13:36:10', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648634, '0307490N', 'N', 'MEASURED LOAD ON PER', 'PS2030/WVL', '5', 'AMPS', 'EMPXD88', TO_DATE('01/07/2011 13:51:06', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into LOG_ITEM_CHARACTERISTICS
       (CHAR_LOG_ID, PIRM_ID, CONSTANT_FLAG, CHARACTERISTIC_NAME, TYPE_NAME, NEW_VALUE, UOM, MODIFIED_BY, MODIFIED_ON)
     Values
       (6648635, '0307490N', 'N', 'OUTPUT VOLTAGE', 'PS2030/WVL', '55', 'VOLTS', 'EMPXD88', TO_DATE('01/07/2011 13:51:06', 'MM/DD/YYYY HH24:MI:SS'));
    COMMIT;

    user4587979 wrote:
    Hi Frank

    Yes, but I had more than 2 tables with item_characteristics, type_characteristics

    If there are other tables involved, then CREATE TABLE and INSERT statements for them (for the relevant columns only). You must not post a lot of examples of data; usually just a couple of lines per table is enough to show the problem.
    Also post the results desired from these data.

    What I try to do is, I'm comparing new_value in log_item_characteristics (whichever is most recent) with CHR_VALUE in the item_characteristics and the needs of different output values

    I am trying to query is not giving desired out put

    Point out some places where the output is wrong and explain how you get good results in these places, using specific examples from the data sample.

    select  lic.PIRM_ID, ic.CHR_ID, lic.CHARACTERISTIC_NAME,
    lic.TYPE_NAME, ic.CHR_VALUE, lic.NEW_VALUE,  lic.MODIFIED_BY,  lic.MODIFIED_ON,
    ic.CREATED_BY, ic.CREATED_ON,ic.MODIFIED_BY, ic.MODIFIED_ON
    from log_item_characteristics lic, item_characteristics ic,type_characteristics tc  where
    lic.TYPE_NAME=tc.TYPE_NAME
    and lic.CHARACTERISTIC_NAME=tc.CHR_NAME
    and lic.PIRM_ID=ic.PIRM_ID
    and tc.CHR_ID=ic.CHR_ID and ic.CHR_VALUE <> lic.NEW_VALUE
    and lic.pirm_id in ('0307490N','0307521C')
    order by lic.pirm_id
    

    Thank you; It is useful to see the existing query. Really, you have to format your code.

    Please can you help me

    What you've posted so far is like saying "I'm going 200 meters to the North, and then 500 meters East, but I'm not getting where I want to go." I would have a better chance to help you if you said, 'I'm out of my house, at 100, Elm Street and try to get to the supermarket at Broadway 279. I'm going 200 meters to the North... ', or, even better. "I want to buy a newspaper and some orange juice, so I thought I'd go to a convenience store. I start at my house, at 100, Elm Street... »
    Always post some examples of data (CREATE TABLE and INSERT statements, as you did in your first post) and the desired results from these data. Explain how you get these results from these data.

  • How can I return results based on 2 columns?

    I have had a problem and it cannot know for life. First of all, here is a series of example data that I use so you can see exactly what I'm asking.

    EmplId Effdt Effseq            

    10001 1 JANUARY 99 ' 0

    10001 1 JULY 11 ' 0

    10001 1 JULY 11 ' 1

    10001 1 JULY 11 ' 2

    10001 1 JULY 12 ' 3

    Do I have to do here is get 3 ranks. 3 rows, I need are lines 1, 4 and 5. I need rank 1 because it's a different date. I need line 5 for the same reason: it is another date. The question arises with how I can get the rank 4. The problem is that the lines 2, 3, 4, and all have the same date (effdt) effective, Developer SQL just returned one of these lines. Because these 3 rows all have the same date (effdt) effective the switch becomes the actual sequence number (effseq). When the date (effdt) effective is the same, you enter the maximum number of sequence (effseq) effective and return results of this whole line as the emplid, effdt and effseq. It seems so simple and something that you can use a subquery for, but its not as simple as that. Note, that you can specifically use the emplid = 10001 in any specific form because there are many employee also id, the lines will not be in a specific order so that you can always just grasp the lines 1, 4 and 5. Some employees may have only a single line in the database, and some may have 50 lines. Everything depends only on the combination of employee id (emplid) date (effdt) efficient and effective sequence (effseq) as the tiebreaker. Any help to fix this would be greatly appreciated. Thank you in advance.

    WITH t
         AS (SELECT 10001 emplid,
                    TO_DATE ('01-JAN-1999', 'dd-mon-yy') effdt,
                    0 effseq
               FROM DUAL
             UNION ALL
             SELECT 10001, TO_DATE ('01-JUL-2011', 'dd-mon-yy'), 0 FROM DUAL
             UNION ALL
             SELECT 10001, TO_DATE ('01-JUL-2011', 'dd-mon-yy'), 1 FROM DUAL
             UNION ALL
             SELECT 10001, TO_DATE ('01-JUL-2011', 'dd-mon-yy'), 2 FROM DUAL
             UNION ALL
             SELECT 10001, TO_DATE ('01-JUL-2012', 'dd-mon-yy'), 3 FROM DUAL)
    SELECT emplid, effdt, effseq
      FROM (SELECT t.*,
                   ROW_NUMBER ()
                      OVER (PARTITION BY emplid, effdt ORDER BY effseq DESC)
                      rn
              FROM t)
     WHERE rn = 1
    
    EMPLID EFFDT EFFSEQ
    10001
    01/01/1999
    0
    10001
    01/07/2011
    2
    10001
    01/07/2012
    3
  • How to divide the lines based on two columns...

    Hi all...
    I have a requirement.

    I have the product, sale, purchase price column... (total of three columns) in a data set.

    my data set is in such a way that... If the sale price is... There is no purchase price and vice versa...

    I need too present in a report, two tables:
    Table 1 includes only the elements of retail price
    Table 2 should only contain the right elements.
    Please see the below photo for good understanding...
    Is this feasible? Where do we need to impose a condition? I tried to impose a condition, but it doesn't seem to work

    http://i51.Tinypic.com/29xfdc6.jpg


    Help, please.

    Can you send me the xml file and the model of [email protected]? I can try to help.

    Have you tried to filter the records by the sale or purchase price is not equal to null column price?

    Thank you
    Bipuser

  • How to concatenate values based on multiple columns of data duplicate in the loop

    Hi all

    Select '100' col_1, '111111' col2 of double

    Union of all the

    Select '100' col_1, '222222' col2 of double

    Union of all the

    Select '101' col_1, '333333' col2 of double

    Union of all the

    Select '102' col_1, '333333' col2 of double

    I need to write by using cursor loop (configurable) so, it must concatenate col_1 or col_2

    If,

    In the table

    col_1, col_2

    100 111111

    100 222222

    101 333333

    102 333333

    Then

    col_1, col_2

    100 111111,222222

    333333 101 102

    Is it possible to compare and concatenate values in the loop

    I have more than 4,000 bytes in the table of col_1,col_2 data values

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    Ok then:

    create a type that makes "grouped" clob

    CREATE or REPLACE TYPE clob_obj IS OBJECT
    (
    CLOB theClob
    ORDER MEMBER FUNCTION equals (in_clob_obj IN clob_obj) RETURN NUMBER
    member function getClobVal return clob)
    /

    CREATE or REPLACE TYPE clob_obj BODY
    IS
    FUNCTION MEMBER ORDER is equal to (in_clob_obj IN clob_obj)
    RETURN NUMBER
    IS
    BEGIN
    RETURN sys.dbms_lob.compare (SELF.theClob, in_clob_obj.theClob);
    END;
         
    Member return clob getClobVal function
    is
    BEGIN
    Return self.theClob;
    end;
    END;
    /

    WITH conc_table AS (SELECT 1111 cust_id, cust_no 'ABC', '101010' ordr_no OF DOUBLE UNION ALL

    SELECT 2222 cust_id, cust_no 'ABC', '101010' ordr_no OF DOUBLE UNION ALL

    SELECT 3333 cust_id, cust_no 'ABC', '101010' ordr_no OF DOUBLE UNION ALL

    SELECT cust_id 4444, "CCC" cust_no, ordr_no ' 123456' OF DOUBLE UNION ALL

    SELECT cust_id 5555, "CCC" cust_no, '454545' ordr_no OF DOUBLE UNION ALL

    Select cust_id 66666, "CCC" cust_no, ordr_no ' 77777' DOUBLE UNION ALL

    SELECT cust_id, "CCC" cust_no, ordr_no ' 77777 66666' FROM DUAL)

    SELECT rtrim (XMLAGG (XMLELEMENT (E, cust_id_no, ',')). EXTRACT ('customer_id //text()').getClobVal (),',')

    clob_obj (ord_number) .getClobVal)

    cust_num

    FROM (SELECT cust_id_no

    cust_num

    rtrim (XMLAGG (XMLELEMENT (E, ord_num, ",")). EXTRACT ('//text ()') .getClobVal (), ',') ord_number

    FROM (SELECT DISTINCT cust_id_no, cust_num, ordr_no AS conc_table FROM ord_num cust_no cust_id)

    GROUP BY cust_id_no

    cust_num)

    GROUP BY clob_obj (ord_number)

    cust_num;

    I got the distinct in the select more intimate for no duplicate of the basetable is only sent to reunification of...

    HTH

  • How to sort the articles by press old (from the date of the day) to the most recent?

    I have a list of new ads since 'January 2015' to 'Dec' 2015. For example, each month having an an event, so totally 12 events. But I need to display the last news items of the day of news to come later in the upper (i.e. may 2015) to the more remote inside (i.e. Dec 2015)

    Try with sorting!

    {module_announcement type = "datereverse"} or {sortType = "datereverse" module_announcement}. I don't know what syntax we use with the new rendering engine.

    With the old syntax, it would be {module_announcement, filter, id, noTemplate, effect, targetFrame, reserved, reserved, reserved, r eserved, sorting}

  • How to extract a value of sql xml column clob data

    Hi guys,.

    I need help with the following. I have a column with data type xml (clob data). I need to extract the information in the < RI4 > tag and the < RI6 > tag.
    I truncated the data, but there is a repetition of the < RI4 > tag and consequenty internal to that tag RI6. However, each tag RI4 and RI6 has different data.

    I would be grateful if you can help me with this:

    <a xsi:schemaLocation="som location.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:somlocation">
      <b>Some stuff here</b>
      <c>
      <someinfo>blah</someinfo>
      <someinfo2>blah2</someinfo2>
      </c>
      <EffectiveDateTime>2015-10-01T00:00:00+10:00</EffectiveDateTime>
      <CurrencyCode>AUD</CurrencyCode>
      <RequiredInformation>
      <RequiredInformation2>
      <RequiredInformation3>
      <RI4>someinfo</RI4>
      <RI5>
      <RI6>
      <a1>1</a1>
      <b1>9.13</b1>
      </RI6>
      <RI6>
      <a1>2</a1>
      <b1>8.75</b1>
      </RI6>
      <RI6>
      <a1>3</a1>
      <b1>78.90</b1>
      </RI6>
      <RI6>
      <a1>4</a1>
      <b1>200</b1>
      </RI6>
      <RI6>
      <a1>5</a1>
      <b1>17.59</b1>
      </RI6>
      </RI5>
      </RequiredInformation3>
      </RequiredInformation2>
      </RequiredInformation>
      </a>
    

    I think that since it's the repetition I might need to make some sort of PL/SQL programming, but I really need help here to build this announcement also a way to extract the information.

    Any help would be greatly appreciated.

    Kind regards

    You can parse your XML like this

    SQL> with t
      2  as
      3  (
      4  select
      5  '
      6      Some stuff here
      7      
      8          blah
      9          blah2
     10      
     11      2015-10-01T00:00:00+10:00
     12      AUD
     13      
     14          
     15              
     16                  someinfo
     17                  
     18                      
     19                          1
     20                          9.13
     21                      
     22                      
     23                          2
     24                          8.75
     25                      
     26                      
     27                          3
     28                          78.90
     29                      
     30                      
     31                          4
     32                          200
     33                      
     34                      
     35                          5
     36                          17.59
     37                      
     38                  
     39              
     40          
     41      
     42  ' xml_str
     43    from dual
     44   )
     45  select t1.ri4, t2.a1, t2.b1
     46    from t
     47       , xmltable
     48         (
     49            xmlnamespaces(default 'urn:somlocation', 'http://www.w3.org/2001/XMLSchema-instance' as "xsi")
     50         ,  '/a/RequiredInformation/RequiredInformation2/RequiredInformation3' passing xmltype(t.xml_str)
     51            columns
     52               ri4 varchar2(10) path 'RI4'
     53             , ri5 xmltype path 'RI5'
     54         ) t1
     55       , xmltable
     56         (
     57            xmlnamespaces(default 'urn:somlocation')
     58          , '/RI5/RI6' passing t1.ri5
     59            columns
     60               a1 number path 'a1'
     61             , b1 number path 'b1'
     62         ) t2;
    
    RI4                A1         B1
    ---------- ---------- ----------
    someinfo            1       9.13
    someinfo            2       8.75
    someinfo            3       78.9
    someinfo            4        200
    someinfo            5      17.59
    
    SQL>
    
  • How to dynamically change values lov to an article based on the button

    Hello

    How to dynamically change the value list of an article based on the button create and apply the changes

    I have the column type of transaction that lov with values as inward, BACK inward outward, outward in the form based on the table...

    in design mode

    I need list to the OUTSIDE inward, in the type of transaction oly column...

    in update mode

    I need the list of BACK inward, BACK outwards in the type of transaction oly column...

    Kind regards

    Pavan

    Maybe something like that for a dynamic LOV

    select label d, label r from
      select 'inward' label  , 'create' chk from dual union all
      select 'outward'       , 'create'     from dual union all
      select 'inward return' , 'update'     from dual union all
      select 'outward return', 'update'     from dual
    )
    where (:P1_ID is null     and chk = 'create')
    or    (:P1_ID is not null and chk = 'update')
    
  • How to submit an article for oracle metalink support knowledge-based

    Hello

    I just wanted to know how to add an article to the knowledge base in Oracle metalink, I know it might it is easy for you to answer.but since I just came in the oracle on the ground I don't know how to do this. It is through the comments link in the oracle metalink site?

    Thanks in advance.

    Best regards
    Tony.

    Once the connection in metalink, you can see the Metalink homepage with the tab 'Community '. This is where you can submit your article.

  • Is there a way to distinguish constraint not null null, out-of-line one online?

    Dear maters,

    Could you please help me to answer the question: How can we distinguish non-null online constraints (non-null column option) not null out-of-line ones (constraints, defined at the table level)? Below is an example of what I mean.

    1. Create a table.
      CREATE TABLE TEST (ID NUMBER NOT NULL);

    At this point, we have created a table with the constraint. The constraint was automatically created because of the option ' not null ' in the column definition. Say that the constraint name is SYS_C00699573. We can get the information about this user/all/dba_constraint or user/all/dba_cons_columns views.

    1. ALTER table.
      ALTER TABLE TEST ADD CHECK ('ID' IS NOT NULL).

    Here, we have created the second constraint as well. Say his name is SYS_C00699574. The only difference between them is that the first is online, and the second constraint is not. Is not only the terminology: If you file online - the 'NOT NULL' option also expires the DDL of the table. This is serious: for example, optimizer Oracle does not the id as nullable column either. If you drop the second - nothing like that happens. Oracle therefore somehow difference between online and offline constraints.

    1. Drop out-of-line constraint. At this point the question arises: How can we distinguish who among the two constraints is online and who isn't? From dba_constraint/all/user or user/all/dba_cons_columns views constraints search exactly except their names.

    Does anyone have an idea? Any help is very appreciated.

    Thank you.

    If you go here:

    SELECT * FROM SYS. CDEF$ WHERE OBJ #= you_table_object_id

    You can see the TYPE # is different, one is 7 (non-null) is 1 (check).

  • Follow-up - how can I order lines based on a value from column to HFR

    As discussed in my question on queries Top, I have a column that I ordered highest to lowest on a report.

    I have now, thanks to mballo, have a column of row (still hidden) as well as the column that contains the values. I have 25 rows. My use of the Rank ([M, 1:25].ifNN(-1), descending) provides values but no order.

    How can I get the lines sorted by the values in a particular column, then the first line has the highest value and the rest in descending order?

    J

    In the property sheet of grid, there is an option "comes out" about 1/2 at the bottom of the page. Once activated it will bring up a window that allows you to apply the sorting. You can take specific lines or all the rows and then apply that based on a column. Or vice versa.

  • How to make an album based on places?

    How would a photo album based on the specific locations of metatag of the photo?

    I miss how iPhoto would let you sort by location, as well as to customize the name of the location.

    Search for photos by typing the name of the location in the field of research, exactly as it is written in the title of the moment.

    Then select all the photos that were found and enter ⌘N to create a new album in the photos. Name of the album as you would call the location.

  • How to submit an article to the knowledge base on the BlackBerry support community.

    How to submit an article to the knowledge base on the BlackBerry support community.

    http://supportforums.BlackBerry.com/T5/BlackBerry-App-world-development/how-to-create-your-own-Artic...

  • How to replace filtering engine based on the Windows Component?

    HI - how to replace filtering engine based on the Windows Component?

    See the link below.   This fix is well worth trying, but if your system has been damaged by malicious programs such as Sirefef there may be more issues involved.

    blogs.technet.com/b/asiasupp/archive/2011/12/27/error-code-0x80070424-with-Windows-Firewall-and-quot-base-filtering-engine-service-quot-not-available-in-services-database-list.aspx

  • How to update a record, if it is a composite key (primary key is based on two columns) in the OPS? page?

    Hello

    Actually I got to know this update of a record must be made when the primary key is based on two columns.

    Previously, I used SPEL for a column. It was working fine.

    But I came to know that regardless of the folder I try to update, it was the update page is coming up with the first combination of the record.

    As if RC 131

    RC 124

    RC 125 are the records.

    If I click on update of RC 124 also, the update page is coming up with RC 131 values as it is the first.

    So I understand that the SPEL should be based on two parameters, because it is a composite key.

    How to do?

    Please let me know if you don't understand the problem.

    Thank you.

    Wow!

    I got it.

    Thank you brothers, always a hope that you could help me

Maybe you are looking for

  • IX2 doesn't quite work

    Hi guys/girls, I recently bought an IX2 on eBay and I can't seem to connect to it. When I plug it in I have a white power led and HDD LED blue, but after 10 seconds, the white power light turns to a blinking red LED. I tried the following: Now the re

  • WIN8: backup program and password at startup

    I have a brand new model Pavilion Sleekbook 14-b013cl running under 64-bit Windows 8. Two questions: (1) Win7 was a program of restoration that could create a disk image with full backup, but Win8 seems to have just a file by file backup system that

  • Cannot install updates: KB982308 KB979441 KB982158 KB982135, KB982312, KB982331

    OK im have a similar problem except its with KB982308, KB979441, KB982158, KB982135, KB982312 and KB982331 I tried everything and they moved there also, I get a message saying that I need to install Microsoft .net Framework Version 2.0, but when I go

  • How to transfer my music from music on my computer game?

    I have a few songs on my computer, but much more in the match of music software on my computer and I can't figure out how to put your hand under my music on my computer. I want that it there because I put an alarm on the computer and I want to a sele

  • HP Compact microtour 6000 Pro: first Motherboard supporting UEFI

    Hi, someone knows the first motherboard that supports UEFI HP, I have a 4 TB HDD in my 6000 Pro MT and want to use the full disk. Thank you, Tim