NULL for repeated records

Hi team,

According to the sub query Deptno column is repeated results must show that it is null

my output should be

    DEPTNO ENAME             SAL         RN        RNK       DRNK
---------- ---------- ---------- ---------- ---------- ----------
        10 KING             5000          1          1          1 
            CLARK            2450          2          2          2 
            MILLER           1300          3          3          3 
        20 SCOTT            3000          1          1          1 
            FORD             3000          2          1          1 
           JONES            2975          3          3          2 
        30 BLAKE            2850          1          1          1 
            ALLEN            1600          2          2          2 
            TURNER           1500          3          3          3 
           MARTIN           1250          4          4          4 
           WARD             1250          5          4          4 
           JAMES             950          6          6          5 

14 selected lines

select deptno
  , ename,sal,
     row_number()
       over (partition by deptno
             order by sal desc)rn,
     rank()
       over (partition by deptno
             order by sal desc)rnk,
     dense_rank()
       over (partition by deptno
            order by sal desc)drnk
    from emp
   order by deptno, sal desc
   /
   DEPTNO ENAME             SAL         RN        RNK       DRNK
---------- ---------- ---------- ---------- ---------- ----------
        10 KING             5000          1          1          1 
        10 CLARK            2450          2          2          2 
        10 MILLER           1300          3          3          3 
        20 SCOTT            3000          1          1          1 
        20 FORD             3000          2          1          1 
        20 JONES            2975          3          3          2 
        20 ADAMS            1100          4          4          3 
        20 SMITH             800          5          5          4 
        30 BLAKE            2850          1          1          1 
        30 ALLEN            1600          2          2          2 
        30 TURNER           1500          3          3          3 
        30 MARTIN           1250          4          4          4 
        30 WARD             1250          5          4          4 
        30 JAMES             950          6          6          5 


 14 rows selected 

Hello

If you need to do this in SQL, and then use an expression BOX to return deptno for the first line of each deptno and NULL for all others.  ROW_NUMBER can determine which is the first line, like this:

Select

CASE

WHEN ROW_NUMBER () OVER (PARTITION BY deptno

Sal of ORDER BY DESC

)  = 1

THEN deptno

ANOTHER NULL - Default; can be omitted

END AS deptno

ename, sal,

ROW_NUMBER()

courses (deptno partition

order by sal desc) rn,.

Rank()

courses (deptno partition

order by sal desc) rnk.

DENSE_RANK()

courses (deptno partition

order by sal desc) drnk

from scott.emp

order by EMP. DeptNo, sal desc

/

Notice how I used emp.deptno in the ORDER byclause in the query.  Simply deptno in this place means that the results of the CASE, not the original column expression.

Tags: Database

Similar Questions

  • Help looking for repeated records and delete them

    I have a table like this

    With a (too)
    Select '1234' ID, 'AAA' Code of all the double union
    Select '9999', 'AAA' from dual union all
    Select '8888', 'CCC' from dual union all
    Select '7777', 'AAA' from dual union all
    Select '6666', 'CCC' from dual union all
    Select '1234', 'BBB' of the double
    )

    1. I want a list of all (double/same) ID's, which has both "AAA" and "BBB" codes
    2. I want to delete duplicates/same ID's where Code = 'BBB '.

    Constraints
    (ID + Code = primary key)
    I do not know the ID's before hand, IE I can not pass it.
    A huge table

    SeshuGiri wrote:
    1. I want to list all (double/same) ID's which codes the two "AAA" and "BBB".

    The following SQL statement will list the duplicates:

    SQL> SELECT  ID
      2  FROM    TEST    T2
      3  WHERE   CODE IN ('AAA','BBB')
      4  GROUP BY ID
      5  HAVING COUNT(*) > 1
      6  /
    
    ID
    ----
    1234
    

    2. I want to delete duplicates/same ID's where Code = 'BBB '.

    SQL> DELETE FROM TEST T1
      2  WHERE   CODE='BBB'
      3  AND     EXISTS
      4          (
      5                  SELECT  ID
      6                  FROM    TEST    T2
      7                  WHERE   T1.ID = T2.ID
      8                  AND     CODE IN ('AAA','BBB')
      9                  GROUP BY ID
     10                  HAVING COUNT(*) > 1
     11          )
     12  /
    
    1 row deleted.
    
    SQL> SELECT * FROM TEST;
    
    ID   COD
    ---- ---
    1234 AAA
    9999 AAA
    8888 CCC
    7777 AAA
    6666 CCC
    

    HTH!

    Published by: Centinul on December 18, 2009 13:17

  • For all the records for each record double, I need to get a single column with null or 0.

    Hi all

    I have a requirement where I need to get all the records, for each record in double, I need to get a single column with null or 0.

    create table a1

    (

    Identification number,

    VARCHAR2 (100), the point

    part varchar2 (100));

    Insert into a1

    values (1, 'ABC', 'A1');

    Insert into a1

    values (2, 'DEF', 'A2');

    TABLE A

    PART ITEM ID

    1 ABC A1

    1 ABC A1

    1 ABC A1

    DEF 2 A2

    DEF 2 A2

    3 DEF A2

    O/P

    PART ITEM ID

    1 ABC A1

    1        ABC             0

    1        ABC             0

    DEF 2 A2

    2       DEF              0

    3       DEF              0

    Thanks in advance.

    Thanks for your help FrankKalush...

    This one will work.

    WITH got_r_num AS

    (

    SELECT NVL (a1.id, a1.id) as id

    NVL (a1.item, a1.item) AS element

    NVL (a1.part, a1.part) IN the framework

    a1.id AS a_id

    ROW_NUMBER () OVER (PARTITION BY a1.id

    ORDER BY NULL

    ) AS r_num

    BY the a1

    )

    SELECT id

    element

    CASE

    WHEN a_id IS NOT NULL

    AND r_num = 1

    THEN part

    ELSE ' 0'

    END in the framework

    OF got_r_num

    ;

  • Determine a value for each record for the whole group

    < < Sorry I pasted erroneous results earlier > >

    Hello

    I have a table (in production, join the many tables, but for simplicity, I created a table), which has a few related accounts grouped by ACCT_GRP_ID I have to write a SQL (not a PL/SQL), who should have all columns of this table and an extra column "FLAG". For GA_CD = BBC, FLAG must have a value of 'No Show', if the APP_DT of at least a recording with the group is less than the current year also all the records in the group will have a value of 'Show '. For the record no BBC FLAG must always be 'Show '.

    DDLS
    {code}
    CREATE TABLE ACCOUNTS
    (NUMBER OF ACCT_GRP_ID,
    GA_CD VARCHAR2 (10),
    AGNT_NAME VARCHAR2 (50).
    NUMBER OF CASE_NUM
    NUMBER OF FUND_AMT
    DATE OF APP_DT,
    STATUS VARCHAR2 (10));

    INSERT INTO ACCOUNT VALUES (1, 'BBC', 'SAMANTHA, JOSE, 12345, 234.33, 2 AUG 2008', ' PLACED');
    INSERT INTO ACCOUNT VALUES (1, 'BBC', 'SAMANTHA, JOSE, 12346, 331,13, 24 APR 2009', ' PLACED');
    INSERT INTO ACCOUNT VALUES (1, 'BBC', 'SAMANTHA, JOSE, 12347, 201,27, 13 FEB 2009', ' PLACED');
    INSERT INTO ACCOUNT VALUES (2, 'BBC', ' MARK, ROSS, 12348, 98.12, 31 MAY 2009', 'PLACE' ");
    INSERT INTO ACCOUNT VALUES (2, 'BBC', ' MARK, ROSS, 12349, 121.00, 25 JUNE 2009', 'PLACE' ");
    INSERT INTO ACCOUNT VALUES (2, 'BBC', 'BRAND, ROSS, 12350, 11.00, 27 JUNE 2009', 'CLOSED');
    INSERT INTO ACCOUNT VALUES (3, 'BBC', "RAJ MALIK", 12351, 89.00, 31 DEC 2008', 'PLACED');
    INSERT INTO ACCOUNT VALUES (3, 'BBC', "RAJ MALIK", 12352, 22.00, 26 OCT 2008', 'PLACED');
    INSERT INTO ACCOUNT VALUES (4, 'BBC', 'SHANE, WILLS', 12353, 443.00, 7 JUNE 2009', 'PLACE');
    INSERT INTO ACCOUNT VALUES (5, 'BBC', 'JANE, WALLACE, 12354, 74.00, 17 JAN 2009', ' PLACED');
    INSERT INTO ACCOUNT VALUES (NULL, 'BBC', 'ROSY, BETH', 12355, 124.00, 21 MAR 2009', 'PLACE');
    INSERT INTO ACCOUNT VALUES (NULL, 'STAR', 'TINA, WZWICK', 22330, 89.00, 31 DEC 2008', 'PLACED');
    INSERT INTO ACCOUNT VALUES (NULL, 'STAR', 'YANA, KORVIN', 27351, 22.00, 26 OCT 2008', 'PLACED');
    INSERT INTO ACCOUNT VALUES (NULL, 'STAR', 'SARA, YUI', 22352, 443.00, 7 JUNE 2009', 'PLACE');
    INSERT INTO ACCOUNT VALUES (NULL, 'STAR', 'MIKE, TROY, 22453, 74.00, 17 JAN 2009', ' PLACED');

    COMMIT;
    {code}

    Required result:
    {code}
    APP_DT GA_CD AGNT_NAME STATE BOITE_ FUND_ ACCT_ INDICATOR
    AMT NUM GRP_ID
    1 SAMANTHA, JOSE PLACE 12347 201.27 BBC 13/02/2009 no show
    1 SAMANTHA, JOSE PLACE 12346 331.13 BBC 24/04/2009 no show
    1 SAMANTHA, JOSE PLACE 12345 234.33 BBC 08/02/2008 no show
    MD2 BBC BRAND, ROSS CLOSED 12350 11 6/27/2009 see the
    MD2 BBC BRAND, ROSS PLACED 12349 121 6/25/2009 see the
    2 BRAND of BBC, ROSS PLACE 12348 98.12 show of 31/05/2009
    3 BBC RAJ MALIK not PLACED 12352 22 10/26/2008 no show
    3 BBC RAJ MALIK not PLACED 12351 89 12/31/2008 no show
    4 BBC SHANE, WILLS PLACE 12353 443 6/7/2009 see the
    5 BBC JANE, WALLACE PLACE 12354 74 1/17/2009 see the
    STARS of MIKE, TROY PLACED 22453 74 1/17/2009 see the
    See the BBC ROSE, BETH PLACED 12355 124 3/21/2009
    STAR SARA, YUI PLACED 22352 443 6/7/2009 see the
    TINA, WZWICK STAR PLACED 22330 89 12/31/2008 see the
    YANA STAR, KORVIN PLACED 27351 22 10/26/2008 see the
    {code}

    As in the results Group 1 has a record with the date of 2008 for the whole group getting 'No Show'. Group 2 has all the records this year, so he gets the 'Show '.
    Help, please!

    Published by: Kuul13 on June 25, 2009 13:31

    Published by: Kuul13 on June 25, 2009 13:43
    I think I'm really having a BAD BAD day... Sorry again... I don't need the domain TOT_FUND_AMT...

    Hello

    Thanks for posting the DDL and DML statements. This helps a lot.

    I don't understand the output, however. Do you want to really two rows of output for each row in the table? The tot_fund_amt is copied from somewhere else? More important still, the results do not include the new flag column. Isn't the point of all of this question? It's good to describe how the indicator is calculated, but you have to show, too.

    I think you want analytical MIN function to find the first app_dt in each group, like this:

    SELECT  a.*
    ,     CASE
              WHEN  ga_cd = 'BBC'
              AND   MIN (app_dt) OVER ( PARTITION BY  ga_cd
                                          ,              acct_grp_id
                                        )  < TRUNC (SYSDATE, 'YYYY')
                    THEN  'No Show'
                    ELSE  'Show'
         END     AS flag
    FROM     accounts   a
    ;
    

    Output:

    . ACCT
      _GRP GA                     CASE     FUND
       _ID _CD  AGNT_NAME         _NUM     _AMT APP_DT     STATUS FLAG
    ------ ---- --------------- ------ -------- ---------- ------ -------
         1 BBC  SAMANTHA, JOSE   12345   234.33 08/02/2008 PLACED No Show
         1 BBC  SAMANTHA, JOSE   12346   331.13 04/24/2009 PLACED No Show
         1 BBC  SAMANTHA, JOSE   12347   201.27 02/13/2009 PLACED No Show
         2 BBC  MARK, ROSS       12348    98.12 05/31/2009 PLACED Show
         2 BBC  MARK, ROSS       12349   121.00 06/25/2009 PLACED Show
         2 BBC  MARK, ROSS       12350    11.00 06/27/2009 CLOSED Show
         3 BBC  RAJ, MALIK       12351    89.00 12/31/2008 PLACED No Show
         3 BBC  RAJ, MALIK       12352    22.00 10/26/2008 PLACED No Show
         4 BBC  SHANE, WILLS     12353   443.00 06/07/2009 PLACED Show
         5 BBC  JANE, WALLACE    12354    74.00 01/17/2009 PLACED Show
           BBC  ROSY, BETH       12355   124.00 03/21/2009 PLACED Show
           STAR TINA, WZWICK     22330    89.00 12/31/2008 PLACED Show
           STAR SARA, YUI        22352   443.00 06/07/2009 PLACED Show
           STAR MIKE, TROY       22453    74.00 01/17/2009 PLACED Show
           STAR YANA, KORVIN     27351    22.00 10/26/2008 PLACED Show
    

    Note that the NULL acct_grp_id is a group. PARTITION BY acct_grp_id is of course necessary, but we must also, PARTITION BY ga_cd all non-BBC lines will be included in this group. In other words, we are unwilling reported as 'No Show', all ROSY just because TINA or JANA had an early app_dt.

  • How can I get the nulls for the weeks later

    Hi all

    When I run this code, I get records up to the current week.
    How can I view the output that I get nulls for the weeks later. (with the help of the v_numOfWeeks variable in the code)

    Thank you
    Vikram
    DECLARE
       v_query VARCHAR2(4000); 
       TYPE ref_cursor IS REF CURSOR; 
       v_refcur ref_cursor;
       v_sum NUMBER; 
       v_id NUMBER; 
       v_name VARCHAR2(1000); 
       v_weeknum NUMBER; 
       v_pernum NUMBER; 
       v_numOfWeeks NUMBER := 5; 
    BEGIN 
    v_query := ' SELECT SUM(product_bkg), postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                              FROM ops_cv_extract b, (SELECT row_id, desc_text postn_name
                          FROM s_postn) postn_tbl
                          WHERE lvl_6_id = 5767
                          AND fiscal_year = 2008
                          AND b.week_num < 4
                          AND b.period_num = 3
                          AND b.postn_id = TO_NUMBER(postn_tbl.row_id)
                          GROUP BY postn_id, postn_tbl.postn_name, b.week_num, b.period_num
                          ORDER BY  postn_tbl.postn_name, b.week_num';
                          
    OPEN v_refcur FOR v_query;
    
    LOOP 
       FETCH v_refcur INTO v_sum, v_id, v_name, v_weeknum, v_pernum;
       EXIT WHEN v_refcur%notfound; 
       dbms_output.put_line('P'|| v_pernum||'W'|| v_weeknum||' '||v_name||' '||v_sum); 
    END LOOP; 
    END;
    /
    
    This is the output when I execute this code. 
    
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W2 COMM CNTRL TAM 216 12561.4
    P3W3 COMM CNTRL TAM 216 2027.1
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    
    This is the output I'd like to get
    
    P3W1 COMM CNTRL ISAM 213 26961.61
    P3W2 COMM CNTRL ISAM 213 12870.4
    P3W3 COMM CNTRL ISAM 213 245.88
    P3W4 COMM CNTRL ISAM 213 
    P3W5 COMM CNTRL ISAM 213 
    P3W1 COMM CNTRL ISAM 273 72831.2
    P3W2 COMM CNTRL ISAM 273 8739.38
    P3W3 COMM CNTRL ISAM 273 3764.92
    P3W4 COMM CNTRL ISAM 273 
    P3W5 COMM CNTRL ISAM 273 
    P3W1 COMM CNTRL TAM 213 49844
    P3W2 COMM CNTRL TAM 213 20515.17
    P3W3 COMM CNTRL TAM 213 16167.46
    P3W4 COMM CNTRL TAM 213 
    P3W5 COMM CNTRL TAM 213 
    P3W1 COMM CNTRL TAM 273 -3336.71
    P3W2 COMM CNTRL TAM 273 -1376.68
    P3W3 COMM CNTRL TAM 273 19707.42
    P3W4 COMM CNTRL TAM 273 
    P3W5 COMM CNTRL TAM 273 
    P3W1 Damon Walters -609.07
    P3W2 Damon Walters 30030.24
    P3W3 Damon Walters 37475.1
    P3W4 Damon Walters 
    P3W5 Damon Walters 
    Published by: polasa on October 28, 2008 18:42

    Hello

    The subquery dum has 1 to 5 hard coded values:

    (
     44                select 1 week_num from dual
     45                union all
     46                select 2 from dual
     47                union all
     48                select 3 from dual
     49                union all
     50                select 4 from dual
     51                union all
     52                select 5 from dual
     53              ) dum ,
     
    

    Instead, use the following syntax, which produces the values from 1 to n:

    (
        SELECT  LEVEL  AS week_num
        FROM    dual
        CONNECT BY  LEVEL <= n
    )  dum,
    

    n may be any numeric expression, including a scalar subquery.

  • a fusion drive is good for audio recording?

    I think buy a 27-inch iMac for audio recording on Logic Pro X, but is not sure a merger player performance, because some say that the part of the HARD of it on only 5400 RPM drive, if I hold with an iMac HARD 7200 RPM drive?

    You will likely get different opinions, but personally I would not use the fusion drive and recommend an SSD.

    Quite significant speed difference.

  • Are there drivers for the recorder sony icd-bp150 for windows 7

    Are there drivers for the recorder sony icd-bp150 for windows 7? I can't recorder to work with the current drivers of dvr3. It works on XP machines but not my computer windows 7...

    Hello sconley3.

    I did some further research and found that, if the worm Software Digital Voice Editor 3.3 is compatible with Windows 7 OS, the recorder itself is not compatible with Windows 7 OS.

    However, you can try to transfer the files from the recorder to a computer with Windows 7 OS installed in it, using the stereo mini plug cable.
    Plug one end of the cable to the headphone jack of the recorder mini stereo jack.
    Plug the other end of the cable to the Microphone Jack on the computer.

    You can follow the link below to transfer files using mini cable plug.
    http://www.KB.Sony.com/selfservice/microsites/search.do?cmd=displayKC&externalID=C1002444

    Kind regards
    ColbyP.

  • java.io.IOException: null for setRequestMethod ("POST") of HttpConnection

    Hello

    I m opening HttpConnection with

    HttpConnection connection = null;
    
    try
    {
        connection = (HttpConnection)Connector.open(targetURL);
        int status = connection.getResponseCode();
        System.out.println("status is : " + status);
    
        if (status == HttpConnection.HTTP_OK)
        {
           System.out.println("HttpConnection.HTTP_OK : "+connection.getResponseMessage());
           connection.setRequestMethod("POST");
           //connection.setRequestMethod(HttpConnection.POST);
           System.out.println("connection.setRequestMethod(POST);
           /*connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
           connection.setRequestProperty("Content-Language", "en-US");
    
           //Send request
           wr = new DataOutputStream(connection.openOutputStream());
                         wr.writeChars(sendRequest);
                         wr.flush();
                         wr.close
           }
    }
    catch (IOException e)
    {
        System.err.println("ERROR =====> " + e.toString()+":: "+e.getMessage());
        e.printStackTrace();
    }
    

    But I m is

    java.io.IOException: null for setRequestMethod("POST")
    

    Until it runs fine.

    What is the problem in my code?

    You do it in the wrong order. You need to do the setRequestMethod(), the setRequestProperty() and the openOutputStream() before calling getResponseCode().

  • Any idea on how to implement the discussions threaded for physical record in URM.

    I have a requirement of implementation of the functionality of dicussion threaded for physical records in URM. It is currently only available for electronic records only.

    Thank you

    Vanina

    We finally reached by taking the output of the component box discussion threads and rename all the services, change some db queries (since all the material metadata element are present in different tables) and also by the way dSource = physical parameter so that the system makes a distinction between electronic and physical records. Also I am not suggesting to ovveride resources of the existing component rather get all resource definitions in your new device. This will eliminate the dependence between two components, and each will work independently.

  • IOM 11 GR 2 - Configuration of automatic approval for automatic recording - organization field

    Hello

    I am trying to configure automatic approval of record auto in OIM 11 g 2.

    I read a lot of links (a relative majority of 11 GR 1 material) but I'm still not able to do this due to the field of the organization being approver only

    I tried to use an adapter to prepopulate (as I do with success with the 'role' attribute) and a search query. None of this has worked.

    I found out that someone did the same steps as me, but the debate is closed without response: Re: configuration of automatic approval for automatic recording - fail because the organization.

    Any advice to achieve this in GR 2 11?

    Thanks in advance

    This message was edited by: 2808590

    In the case where a person is confronted with the same question, I solved it by using an event handler to pre-process on user create.

    The following link can give some advice: identity and access management: automatic approval for Self-Register users - OIM 11 g R2

    To get dynamically key of the organization by the name of the Organization, you can use it in Manager:

    The value attrRet = new HashSet();

    attrRet.add (OrganizationManagerConstants.AttributeName.ID_FIELD.getId ());

    Organization org = orgManager.getDetails (orgName, attrRet, true);

    Object orgKey = org.getAttribute (OrganizationManagerConstants.AttributeName.ID_FIELD.getId ());

    return (Long) orgKey;

  • Search for a record at least one value

    Hello

    At the bottom of the example I need data that contains at least one event date start of a particular event.

    If the date of start of the event is null for all events for a particular id, then do not appear in the list.

    with acf as

    (

    Select 1001 as the id, "Epilepsy" as illness, 23 January 2015 ' as event_start Union double

    Select 1001, "Epilepsy", "Union double

    Select 1001, "Ascites", 1 December 2011 the Union double

    Select 1002, 'Subileus', "Union double

    Select 1002, 'increased creatinine', "Union double

    Select 1003, "creatinine decreased", 2 October 2012 ' double Union

    Select 1003, "level of creatinine", 2 October 2013 ' double Union

    Select 1004, "alkaline serum '," Union double

    Select 1005, 'Blood sugar', March 4, 2004 "of the double

    )

    Select * from acf

    Output

    IDDISEASEEVENT_START
    1001Ascites12/01/2011
    1001Epilepsy23/01/2015
    1001Epilepsy
    1003creatinine decreased10/02/2012
    1003creatinine level10/02/2013
    1005Blood sugar levels03/04/2004

    SELECT *.

    Join ACF (select group id of the acf by id having max (event_start) is not null) started using (id)

    Ascites 1001 01/12/2011

    1001 epilepsy 23/01/2015

    1001 epilepsy

    1003 creatinine decreases 10/02/2012

    1003 creatinine level 10/02/2013

    1005 blood sugar level 04/03/2004

    Good bye

    DPT

  • generation of XML for each record

    I have a table db with a few thousand records in it. I need to generate an xml file for each record so that it can power a search machine.

    Can someone help me with this? I could not get it. Here is the example of table.

    create table test_xml)

    number of U_ID

    title varchar2 (500),

    VARCHAR2 (500) keywords.

    Description varchar2 (500),

    VARCHAR2 (500) of the user.

    e-mail varchar2 (500),

    initiator_function varchar2 (500),

    function_impacted varchar2 (500),

    old_request_num varchar2 (500),

    project_region varchar2 (500)

    );

    insert into test_xml values (1, "Heading1 test", "blah bla1", "test 123 ', 1234567',' [email protected]', 'test init funct', 'funct hit test', '55556677', 'abc' ');

    insert into test_xml values (2, 'Title2 test', 'blah bla2', ' test 1232', 1234522',' [email protected]', 'test init funct2 ',' test power supply impacted2', ' 55556679', 'abcccs' ");

    the end result is an XML for each record in this format.

    <? XML version = "1.0" encoding = "utf-8"? >

    <! DOCTYPE gsafeed PUBLIC "-//Google//DTD GSA RSS / / IN" "" > "".

    < gsafeed >

    < header >

    < datasource > ID 1 < / datasource >

    < feedtype > full < / feedtype >

    < / header >

    <>Group

    " < analysis record immediately = 'true' url = ' http://test.com/SearchResult.php?id=1 "action = 'Add' mimetype =" text/html"lock ="true"> "

    < content > <! [CDATA]

    < html >

    < head >

    Heading1 test < title > < /title >

    < meta name = "Keywords" content = "bla bla1" / >

    < name meta = "description" content = "testing 123" / >

    < name meta = "user" content = "1234567" / >

    " < name meta = 'EMAIL' content = ' [email protected] " />

    < name meta = "Source" content = "1" / >

    < / head >

    < body >

    < p > user: 1234567

    < p > EMAIL: bob . [email protected] 

    < p > INITIATOR_FUNCTION: test init funct

    < p > FUNCTION_IMPACTED: test hit funct

    < p > OLD_REQUEST_NUM: 555566777

    < p > PROJECT_REGION: abc

    < /p > < / body >

    < / html >

    []] > < / content / >

    < / recording >

    < / Group >

    < / gsafeed >

    Thanks for any help.

    I'd use SQL/XML functions, more rapid way to generate XML from relational data data.

    Something like the following should you get.

    It displays a document (such as a CLOB) per line in the base table:

    with html_content as (
      select xmlcdata(
               xmlserialize(document
                 xmlelement("html"
                 , xmlelement("head"
                   , xmlelement("title", t.title)
                   , xmlelement("meta", xmlattributes('Keywords' as "name", t.keywords as "content"))
                   , xmlelement("meta", xmlattributes('description' as "name", t.description as "content"))
                   , xmlelement("meta", xmlattributes('user' as "name", t.user_ as "content"))
                   , xmlelement("meta", xmlattributes('EMAIL' as "name", t.email as "content"))
                   , xmlelement("meta", xmlattributes('Source' as "name", t.u_id as "content")) -- ??
                   )
                 , xmlelement("body"
                   , xmlelement("p", 'EMAIL: '||t.email)
                   , xmlelement("p", 'INITIATOR_FUNCTION: '||t.initiator_function)
                   , xmlelement("p", 'FUNCTION_IMPACTED: '||t.function_impacted)
                   , xmlelement("p", 'OLD_REQUEST_NUM: '||t.old_request_num)
                   , xmlelement("p", 'PROJECT_REGION: '||t.project_region)
                   )
                 )
                 indent
               )
             ) as content
      from test_xml t
    )
    select '' ||
           '' ||
           xmlserialize(document
             xmlelement("gsafeed"
             , xmlelement("header"
               , xmlelement("datasource", 'ID 1')
               , xmlelement("feedtype", 'full')
               )
             , xmlelement("group"
               , xmlelement("record"
                 , xmlattributes(
                     'true' as "crawl-immediately"
                   , 'http://test.com/searchresult.php?ID=1' as "url"
                   , 'add' as "action"
                   , 'text/html' as "mimetype"
                   , 'true' as "lock"
                   )
                 , xmlelement("content", html.content)
                 )
               )
             )
             indent
           )
    from html_content html ;
    

    NB: indent option is to print only, you can remove it if you don't need.

  • How can I install Adobe Acrobat DC Windows XP? Can I download and install Adobe Acrobat XI Pro and then use the serial number of DC for the record?

    How can I install Adobe Acrobat DC Windows XP? Can I download and install Adobe Acrobat XI Pro and then use the serial number of DC for the record?

    Hi ckc60777449,

    We're sorry, but the serial number would work only for Acrobat DC and not acrobat XI.

    You will need to upgrade your operating system to windows 7 to install acrobat DC.

    Let us know if you need additional assistance.

    Concerning

    Sarojini

  • How to set a default file for the recording of the work type

    Looking and looking, is there really no way to define the type of default file for the recording of the Photoshop work?

    Not save as.  After this adjustment, just use Ctrl s

    Try this:

    Make a new file

    Save as and Ctrl, click on the PNG format

    Be another file and use Ctrl s.  The Save dialog box opens and the format will always be PNG

    Use Save as, and Ctrl-click on PDF

    Make another new file and Ctrl s.  PDF will now be the format.

    Who is?

  • [ADF, JDev 12.1.3] How to display multiple records on the same page... not in a table but they appear a form for each record

    Hallo,

    I need to create a page that displays the records of a VO, but I would not use a table.

    Instead, I would like to display a form for each record to be displayed.

    Forms must appear one above the other and each form should have 2 buttons: one to remove the file/form itself and one to add a new file/form.

    When you press the button Add a new empty form should be dynamically added to the page (so that the user can fill) and created related record.

    When REMOVE button is pressed the form (which contains the operated button) should be disappear and the record shuould be deleted.

    Creations and destruction must be applied only if the user clicks a button on CONFIRMATION / COMMIT.

    Maybe this http://digilander.libero.it/flattit82/OTN_FILES/MultiFormPage.png picture can help to understand what I want to do.

    You kindly help me?

    Thank you

    Federico

    Hi Federico

    I was saying that your page layout can be achieved using af: table

    See this image:

    This provision is af:table (I think same as yours), just add a column in the table and put all the fields in this column then correct layout allows to design as a provision on the form or group layouts

    I'm not saying it's the best approach, but you can try this

    Thank you

Maybe you are looking for