The combination of several lines to line of monkey through SQL Stmt

Hello

I try to combine the values returned by several rows in a row,
through indoor/outdoor sql or any optimally.
In the example, I would like to have name, surname, email and phone to be
returned in a single line.
create table TEMP_AAAAA
(
  FIRST_NAME VARCHAR2(25),
  LAST_NAME  VARCHAR2(25),
  CON_METHOD VARCHAR2(25),
  CON_VALUE  VARCHAR2(25)

)

INSERT INTO TEMP_AAAAA VALUES('TOM','MAC','EMAIL','[email protected]');
INSERT INTO TEMP_AAAAA VALUES('TOM','MAC','PHONE','12345');
Any suggestion to do this through sql stmt.
I did it through pl/sql, I wondered if it could be realized only thru SQL Stmt
DECLARE
v_FIRST_NAME  VARCHAR2(25);
v_SECOND_NAME VARCHAR2(25);
v_EMAIL       VARCHAR2(25);
v_PHONE       VARCHAR2(25);
BEGIN
v_FIRST_NAME := NULL;
v_SECOND_NAME := NULL;
v_EMAIL := NULL;
v_PHONE := NULL;

FOR IMPL_CUR IN(SELECT * FROM TEMP_AAAAA ORDER BY CON_METHOD DESC)
LOOP

        IF v_FIRST_NAME IS NULL
        THEN
           v_FIRST_NAME := IMPL_CUR.FIRST_NAME;
        END IF;
        IF v_SECOND_NAME IS NULL
        THEN
           v_SECOND_NAME := IMPL_CUR.LAST_NAME;
        END IF;   
        IF v_PHONE IS NULL AND IMPL_CUR.CON_METHOD = 'PHONE'
        THEN
           v_PHONE := IMPL_CUR.CON_VALUE;
        END IF;
       
        IF v_FIRST_NAME = IMPL_CUR.FIRST_NAME AND 
           v_SECOND_NAME = IMPL_CUR.LAST_NAME AND 
           length(v_PHONE) > 0 
        THEN
          IF v_EMAIL IS NULL AND IMPL_CUR.CON_METHOD = 'EMAIL'
          THEN
             v_EMAIL := IMPL_CUR.CON_VALUE;
             EXIT;
          END IF;        
        END IF;
        
        
        
END LOOP;

                   
         DBMS_OUTPUT.put_line('firstName...:' || v_FIRST_NAME);     
         DBMS_OUTPUT.put_line('lastName....:' || v_SECOND_NAME);     
         DBMS_OUTPUT.put_line('PHONE.......:' || v_PHONE);
         DBMS_OUTPUT.put_line('EMAIL.......:' || v_EMAIL); 

END;

SELECT FIRST_NAME, LAST_NAME,
MAX (SUBSTR (SYS_CONNECT_BY_PATH (CON_VALUE,' '), 2)) EMP_LIST
(SELECT FIRST_NAME, LAST_NAME, CON_VALUE,
ROW_NUMBER() OVER (PARTITION FIRST_NAME, LAST_NAME ORDER BY CON_METHOD) RN
OF TEMP_AAAAA)
CONNECT BY PRIOR (FIRST_NAME |) LAST_NAME. =(FIRST_NAME||) RN) LAST_NAME. (RN-1))
START BY RN = 1
GROUP FIRST_NAME, LAST_NAME;

FIRST_NAME LAST_NAME EMP_LIST
------------------------- ------------------------- ------------------------------------------------
TOM MAC [email protected] 12345

Tags: Database

Similar Questions

  • Problem with the help of several lines of flight path images. Any help would be greatly appreciated thanks!

    Hello

    I use several lines of flight path images, and when the mouse is hovering over an image rollover on the second row or below the image that is supposed to appear appears on the image at the top of its column. Any help would be appreciated, I've tried everything I can and can not find a way to solve this problem. If you need videos or screenshots of the problem, DOM Panel or code please ask. Thank you

    I'm on a mac on Yosemite and spin the latest version of dreamweaver

    Until you find permanent web hosting, do a Google search for free web hosting.  You will find a lot out there that you can use for temporary testing & debugging.

    Nancy O.

  • A question about the count of several lines of table in a PL/SQL block

    Hi all




    I have a problem on counting the rows from several tables in a PL/SQL block, and I would be grateful if you could kindly give me a helping hand. Here's my problem: file in Microsoft Excel (one column) I have a list of several names of tables. For each table, when the number of rows is equal to 10000 I have to call a procedure. Here's how I tried to do:
    DECLARE
         CURSOR tb_cursor IS
              WITH my_table_names AS
                   (
                        SELECT  'table1'  AS tbname  FROM  DUAL  UNION
                        SELECT  'table2'  AS tbname  FROM  DUAL  UNION
                        SELECT  'table3'  AS tbname  FROM  DUAL  UNION
                        SELECT  'table4'  AS tbname  FROM  DUAL  UNION
                        .
                        .  Here I continue writing one line for each table in order
                        .  to have the table names stored in my Excel file as a table 
                           to be queried by SELECT statement
                        .
                   )
              SELECT *
              FROM my_table_names;
    BEGIN
         -- Here I verify that for each table having more than 10000 lines
         -- I call the specified procedure which is needed
         
         FOR I IN tb_cursor LOOP
              DECLARE
                   -- Here I declare a cursor for counting the number of rows
                   CURSOR currentTableRowCounter IS
                        SELECT COUNT(*) AS rowsNum
                        FROM I.tbname;
                        
                   numberOfRows currentTableRowCounter%ROWTYPE;
              BEGIN
                   OPEN currentTableRowCounter;
                   FETCH numberOfRows INTO numberOfRows;
                   CLOSE currentTableRowCounter;
                   
                   IF (numberOfRows.rowsNum > 10000) THEN
                        -- And here I will call the procedure which has to be run
                   END IF;
              END;
         END LOOP;
    END;
    /
    I already checked this code with tables inividual and it works. The only problem is
    . . .
    SELECT COUNT(*) AS rowsNum
    FROM I.tbname;
    . . .
    Indeed, oracle considers "I.tbname" as an unknown table name (although he refers to by its exact name).
    SQL> @script.sql
    
                                    FROM I.tbname;
                                           *
    ERROR at line 99:
    ORA-06550: line 99, column 12:
    PL/SQL: ORA-00942: table or view does not exist
    How can I solve this problem? I mean, how to use a variable (in my example, I.tbname) as the table name in the FROM clause to query a table instead of explicitly write the name of the table?





    Thanks in advance,
    Dariyoosh

    Replace the following code:

              DECLARE
                   -- Here I declare a cursor for counting the number of rows
                   CURSOR currentTableRowCounter IS
                        SELECT COUNT(*) AS rowsNum
                        FROM I.tbname;
    
                   numberOfRows currentTableRowCounter%ROWTYPE;
              BEGIN
                   OPEN currentTableRowCounter;
                   FETCH numberOfRows INTO numberOfRows;
                   CLOSE currentTableRowCounter;
    
                   IF (numberOfRows.rowsNum > 10000) THEN
                        -- And here I will call the procedure which has to be run
                   END IF;
              END;
    

    By the following:

    Declare
      numberOfRows number;
    begin
      EXECUTE IMMEDIATE 'select count(*) from '||I.tbname into numberOfRows;
    
      IF (numberOfRows.rowsNum > 10000) THEN
        -- And here I will call the procedure which has to be run
      END IF;
    end;
    

    Max
    [My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/01/10/crittografia-in-plsql-utilizzando-dbms_crypto/]

    Published by: Massimo Ruocchio, January 12, 2010 15:25
    Added Variable Declaration

  • View the information from the related table instead of the ID in several line datablock

    Hello

    I searched on the web, the forum and the documentation, but I have not found a solution to this problem:

    I have two tabs with a relationship of the master / detail of one-to-many. Block detail data shows several lines such that it can be several associations table of mater in the details and I want to display the description of the master data block instead of the field with the ID for each line in the block of retail.

    I tried to place an item with the option 'copy value', but then I lose the relationship of master / detail, because that is what forms wih the field id for linking blocks.

    Also, I've seen in other posts that I can use a view, but I can't understand how would I update or remove data then.

    The only thing that I realized is to the description field in its own datablock in the same tab, a relationship master / detail-detail (or master-detail-master). BTW, I don't think it's beautiful "formulas"programming"and it does too much for my needs."

    I guess it must be a trivial thing, but I don't know what to try next. Thanks in advance!

    Published by: user10278211 on Sep 17, 2008 20:13

    AAH, I think now I got your management!

    You have 1 Deptno and dname "XYZ" in the master and you want to display:

    EmpNo Ename DName
    1     User1 XYZ
    2     User2 XYZ
    

    -What?

    If so:

    1 create a new element in the retail block, let's call it DSP_DNAME, set database property to point to 'no '.
    2. create a POST-QUERY-Trigger on detail-block with the code: DETAILBLOCKNAME. DSP_DNAME: =: MASTERBLOCKNAME. DNAME;
    3. create WHEN-CREATE-RECORD-Trigger with the same code.

    That's all

  • Problem with PPR in a table advanced with the insertion of several lines in create the page using 'add a new button '.

    Hello experts,

    I created a page that contains an array of advanced, 6-7fields (including a poplist column)

    Whenever I have add a new using the line add new line button, I get a null pointer exception.

    Code in Scenario1.


    Public Sub handleCurrencyChangeEvent()

    {

    PVO OAViewObject = (OAViewObject) findViewObject ("xxCurrencyPVO1");

    Line OARow = (OARow) pvo.first ();

    OAViewObject dtlVO = (OAViewObject) findViewObject ("xxEcreditCardDtlVO1");

    OARow dtlRow = (OARow) dtlVO.getCurrentRow ();

    String currency = (String) dtlRow.getAttribute ("CurrencyCode");    / / NULL POINTER EXCEPTION

    If ((currency == null) |) ("AED".equals (currency)))

    {

    row.setAttribute ("ExchangeRateTypeRender", Boolean.FALSE);

    row.setAttribute ("ExchangeRateDateRender", Boolean.FALSE);

    row.setAttribute ("ExchangeRateRender", Boolean.FALSE);

    }

    on the other

    {

    row.setAttribute ("ExchangeRateTypeRender", Boolean.TRUE);

    row.setAttribute ("ExchangeRateDateRender", Boolean.TRUE);

    row.setAttribute ("ExchangeRateRender", Boolean.TRUE);

    }

    }

    Public Sub initPVO()

    {

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

    If (appPropsVO! = null)

    {

    If (appPropsVO.getFetchedRowCount () == 0)

    {

    appPropsVO.setMaxFetchSize (0);

    appPropsVO.executeQuery ();

    appPropsVO.insertRow (appPropsVO.createRow ());

    Line OARow = (OARow) appPropsVO.first ();

    row.setAttribute ("RowKey", new Number (1));

    }

    }

    handleCurrencyChangeEvent();    / / If I comment on this call, there will be no null pointer when I click on the button Add a new rank and PPR will not be the first line when I select the poplist.                 

    }

    Public Sub createDetailRow()

    {

    String hdrId;

    OAViewObject hdrvo1 = (OAViewObject) getxxEcreditCardHdrVO1 ();

    OAViewObject dtlvo = (OAViewObject) getxxEcreditCardDtlVO1 ();

    Initialize and create a line of VO

    If (! dtlvo.isPreparedForExecution ())

    {

    dtlvo.setMaxFetchSize (0);

    dtlvo.executeQuery ();

    }

    Line dtlrow = dtlvo.createRow ();

    dtlvo.executeQuery ();

    int count = dtlvo.getRowCount ();

    dtlvo.insertRowAtRangeIndex (count, dtlrow);

    Development of the sequence for the number of request *.

    Number of dtlseq = getOADBTransaction () .getSequenceValue ("xxdm. XXDMI_ECREDIT_CARD_DTL_SEQ");

    hdrId = hdrvo1.getCurrentRow ().getAttribute("CreditCardHdrId").toString (); mind vo

    dtlrow.setAttribute ("CreditCardHdrId", hdrId);

    dtlrow.setAttribute ("CreditCardLineId", dtlseq);

    dtlrow.setAttribute ("LineNumber", count + 1);

    End of sequence generation *.

    dtlrow.setAttribute ("CurrencyCode", "AED");

    String currency = (String) dtlrow.getAttribute ("CurrencyCode");

    System.out.println ("CurrencyCode:" + currency);

    dtlrow.setNewRowState (Row.STATUS_INITIALIZED);

    } / / end createDetailRow()

    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)

    {

    super.processFormRequest (pageContext, webBean);

    OAApplicationModule am = pageContext.getApplicationModule (webBean);

    Event string = pageContext.getParameter (OAWebBeanConstants.EVENT_PARAM);

    * Treatment add line button *.

    If ((ADD_ROWS_EVENT. Equals (Event)) & & "AdvTblRN".equals (pageContext.getParameter ("source"))) ".

    {

    am.invokeMethod ("createDetailRow", null);

    am.invokeMethod ("initPVO");

    } //**End add row button *.

    otherwise if

    ("currCodeChangeEvent".equals (pageContext.getParameter (OAWebBeanConstants.EVENT_PARAM)))

    {

    am.invokeMethod ("handleCurrencyChangeEvent");

    }

    ===========================================================================================================================

    Could please help what is wrong in the code, I followed all the steps as stated in the guide, but the table advance, the problem starts whenever I click on the button Add a new row for the creation of new line.

    I couldn't understand what was wrong with the code.

    Thanks in advance,

    Suman

    Suman,

    A few points:

    1. Why do you call handleCurrencyChangeEvent in the event to add a line? Simply set the useful, likely of the values in the line it himself.

    ex:-instead of calling the handleCurrenyChange method, simply add the below lines inside the createDetailRow()

    dtlrow.setAttribute ("ExchangeRateTypeRender", Boolean.FALSE);

    dtlrow.setAttribute ("ExchangeRateDateRender", Boolean.FALSE);

    dtlrow.setAttribute ("ExchangeRateRender", Boolean.FALSE);

    2. it looks like you have on the field of the currency and that fireAction handleCurrencyChangeEvent action method is called, right?

    Instead of using dtlVo.getCurrentRow, use the code below:

    public void handleCurrencyChangeEvent(String eventRowSourceParam)
      {
      OAViewObject pvo = (OAViewObject)findViewObject("xxCurrencyPVO1");
      OARow row = (OARow)pvo.first();
    
      OAViewObject dtlVO = (OAViewObject)findViewObject("xxEcreditCardDtlVO1");
    
      //OARow dtlRow = (OARow)dtlVO.getCurrentRow();
      OARow dtlRow = (OARow)this.findRowByRef(eventRowSourceParam);
    
      String  currency = (String)dtlRow.getAttribute("CurrencyCode");    // NULL POINTER EXCEPTION
    
      if ((currency == null) || ("AED".equals(currency)))
      {
      row.setAttribute("ExchangeRateTypeRender", Boolean.FALSE);
      row.setAttribute("ExchangeRateDateRender", Boolean.FALSE);
      row.setAttribute("ExchangeRateRender", Boolean.FALSE);
      }
      else
      {
      row.setAttribute("ExchangeRateTypeRender", Boolean.TRUE);
      row.setAttribute("ExchangeRateDateRender", Boolean.TRUE);
      row.setAttribute("ExchangeRateRender", Boolean.TRUE);
      }
      }
    

    In the controller:

    if((ADD_ROWS_EVENT.equals(event)) && "AdvTblRN".equals(pageContext.getParameter("source")) )
    {
      am.invokeMethod("createDetailRow",null);
      am.invokeMethod("initPVO");
    } //**End Add Row Button**
    else if ("currCodeChangeEvent".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
    {
      String eventRowSourceParam = pageContext.getParameter(EVENT_SOURCE_ROW_REFERENCE);
      Serializable[] params = {eventRowSourceParam};
        Class[] paramTypes    = {String.class};
      am.invokeMethod("handleCurrencyChangeEvent",params, paramTypes);
    }
    

    3. Why do you call initPVO when it is clicked on the Add line? Are you calling not just in the PR?

    You could call it once in the PR and let. When you call it PR, you may need to remove the handleCurrencyChangeEvent of this method call.

    See you soon

    AJ

  • Dashboard of the guests on several lines

    Hi experts

    I have more than 6 guests on my report and I want to show two lines rather on a single line as it is to give the horizontal scroll bar, I tried to look in portalbanner.css but not of a big utility... can you help me how to...

    Thanks and greetings

    Published by: user11678978 on July 2, 2010 15:06

    In the quick definition, you have your 6 guests, Yes? On the far left of the third line - initially - click on the checkbox to 'group '. This will put guests in two lines. Play with invites to the box by to get the best fit.

  • Concatenate the strings of several lines into one line.

    Hello

    What is the name of this analytical function (or log in) which
    would return more line as a concatenated line strings. that is to say:
    (I know that it is possible using the regular functions of pipeline).
    ROW1:   STR1
    ROW2:   STR2
    ROW3:   STR3
    
    select tadah().... from ...
    
    result:
    
    ROW1: STR1 STR2 STR3
    Thank you.

    Hello

    DanielD wrote:
    Hello

    What is the name of this analytical function (or log in) which
    would return more line as a concatenated line strings. that is to say:
    (I know that it is possible using the regular functions of pipeline).

    ROW1:   STR1
    ROW2:   STR2
    ROW3:   STR3
    
    select tadah().... from ...
    
    result:
    
    ROW1: STR1 STR2 STR3
    

    The function is SYS_CONNECT_BY_PATH

  • Divide the data into several lines in the table

    Hello

    I use apex of Oracle 10 g 3.2.

    I have a requirement like this.

    I have a table like TableA

    Col1 Col2
    90 1
    91 1:2:3
    92 3

    I want the data as

    Col1 Col2
    90 1
    91 1
    91 2
    91 3
    92 3

    How to do this?

    Thank you

    Published by: user13305573 on August 3, 2010 20:16
    with
       your_data as
    (
       select 90 as col1, '1'  as col2      from dual union all
       select 91, '1:2:3'   from dual union all
       select 92, '3'       from dual
    )
    select
       y.col1,
       regexp_substr(y.col2, '[^:]+', 1, t1.column_value) as col2
    from
       your_data y,
     13     table(cast(multiset(select level from dual connect by  level <= length (regexp_replace(y.col2, '[^:]+'))  + 1) as sys.OdciNumberList)) t1
     14  /
    
                  COL1 COL2
    ------------------ -----
                    90 1
                    91 1
                    91 2
                    91 3
                    92 3
    
    5 rows selected.
    
    Elapsed: 00:00:00.05
    ME_XE?select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    5 rows selected.
    
    Elapsed: 00:00:00.03
    ME_XE?
    
  • Combination of several lines into one

    Hello

    I have a table like this

    ID | name
    1 aWord
    1 Anotherword
    2 Gisela


    I would like a result of the query, where two rows (or a lot as it is in the table, with this id) to put in a string separated by commas, like this "aWord, Anotherword" ID = 1. Preferably, I would like to avoid using cursors...

    Any help on this is appreciated.

    Thank you

    /David N

    Like this...

    SQL> ed
    Wrote file afiedt.buf
    
      1  select deptno, ltrim(sys_connect_by_path(ename,','),',') as enames
      2  from (
      3        select deptno, ename, row_number() over (partition by deptno order by ename) rn from emp
      4       )
      5  where connect_by_isleaf = 1
      6  connect by deptno = prior deptno
      7         and rn = prior rn + 1
      8  start with rn = 1
      9* order by deptno
    SQL> /
    
        DEPTNO ENAMES
    ---------- --------------------------------------------------
            10 CLARK,KING,MILLER
            20 ADAMS,FORD,JONES,SCOTT,SMITH
            30 ALLEN,BLAKE,JAMES,MARTIN,TURNER,WARD
    
    Or to ensure names are distinct...
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  select deptno, ltrim(sys_connect_by_path(ename,','),',') as enames
      2  from (
      3        select distinct deptno, ename, dense_rank() over (partition by deptno order by ename) rn
      4        from emp
      5       )
      6  where connect_by_isleaf = 1
      7  connect by deptno = prior deptno
      8         and rn = prior rn + 1
      9  start with rn = 1
     10* order by deptno
    SQL> /
    
        DEPTNO ENAMES
    ---------- --------------------------------------------------
            10 CLARK,KING,MILLER
            20 ADAMS,FORD,JONES,SCOTT,SMITH
            30 ALLEN,BLAKE,JAMES,MARTIN,TURNER,WARD
    
    SQL>
    
  • The combination of several AD ACS 4.2 security groups

    Hello

    Our ACS is used for AAA for the wireless, the IOS CLI access and access to the unix server. For net admins and administrators unix, there are two levels, so indeed, we have 5 groups of individual devices that a user can be granted access.

    User groups are defined in Active Directory.

    I am looking for a way to combine information from several AD security groups to determine what a user can access. For example, a net administrator may or may not be a unix admin as well.

    Is it possible to do other than to have to have a large number of ad groups with one for each combination of authorization privileges?

    Thank you

    Luke

    HI Luke,.

    Definition of mapping of the hybrid is the best way to achieve this.

    Kind regards

    ~ JG

    Note the useful messages

  • The combination of several documents for double-sided printing

    Is it possible to combine several pdf documents or word to insert automatically blank pages on the documents that use odd pages, but doesn't add pages to documents whose pages even if the final combined PDF is put in place for duplex printing with the first page of each current combined to go on the front of a page?

    For example, I have 4 different PDF with different numbers of pages:

    pdf = 3 pages 001.exe (numbered a01, a02, a03)

    002 pdf = 4 pages (numbered b01, b02, b03 - b04)

    003 pdf = 5 pages (numbered c01, c02, c03 c04 c05)

    004 pdf = 3 pages (numbered d01, d02, d03)

    Page number 01 must always be on the front, but if I combine the pdf page b01 will be on the back of a03 and I have to manually insert a blank page.  This will make b01 printed on the front of page 3, which is what I want, it will also fix b02 - c05 002. PDF with an even number of pages, but d01 must print on the back of page 7 instead of the front of the 8 page because there is no blank page after 003.pdf.

    Is there a way to make acrobat recognizes the number of pages in a document and then insert a blank page automatically when it acknowledges the documents with an odd number of pages?

    If the feature/script would follow these steps:

    001.exe pdf recognized as 3 pages (numbered a01, a02, a03)

    blankpage.PDF

    002 pdf, recognized as being 4 pages (numbered b01, b02, b03 b04)

    003 pdf recognized as 5 pages (numbered c01, c02, c03 c04 c05)

    blankpage.PDF

    004 pdf, recognized as being of 3 pages (numbered d01, d02, d03)

    make the final printed output pages 9:

    A01 (front) / A02 (back) d03 a03/blank b01/b02, b03/b04, c01/c02, c03/c04, c05/blank, d01/d02

    Something like this:

    If ((this.numPages % 2) == 1) {}

    Insert a blank page

    }

  • The combination of several tables: patent wise associates to a given laboratory

    Oracle 10g

    Ask your help to rewrite the query below correctly

    I have the following tables
    CREATE TABLE  "ADDLAB" 
       (     "VERSIONNO" NUMBER(*,0), 
         "LABID" VARCHAR2(20), 
         "LABNAME" VARCHAR2(60), 
         "LABSTARTDATE" DATE, 
         "LABSTATUS" VARCHAR2(20), 
         "LABENDDATE" DATE, 
         "OPERATOR" VARCHAR2(20), 
         "FROMDATE" DATE, 
         "TODATE" DATE, 
         "SRCHFIELD" VARCHAR2(20), 
         "PARENTLABID" VARCHAR2(20), 
         "LABCLOSEREASON" VARCHAR2(1000), 
         "LABHIDDENDATE" VARCHAR2(20), 
          CONSTRAINT "PK_B34" PRIMARY KEY ("LABID", "LABHIDDENDATE") ENABLE
       )
    
    CREATE TABLE  "ADDPROJECT" 
       (     "VERSIONNO" NUMBER(*,0), 
         "PROJID" VARCHAR2(20), 
         "PROJNAME" VARCHAR2(60), 
         "PROJSTARTDATE" DATE, 
         "PROJSTATUS" VARCHAR2(20), 
         "PROJENDDATE" DATE, 
         "PROJENDTYPE" VARCHAR2(20), 
         "PROJENDREASON" VARCHAR2(1000), 
         "UCPROJECTMANAGER" VARCHAR2(20), 
         "FROMDATE" DATE, 
         "TODATE" DATE, 
         "SRCHFIELD" VARCHAR2(20), 
         "OPERATOR" VARCHAR2(20), 
         "PARENTPROJID" VARCHAR2(20), 
         "PROJHIDDENDATE" VARCHAR2(20), 
          CONSTRAINT "PK_B36" PRIMARY KEY ("PROJID", "PROJHIDDENDATE") ENABLE
       )
    
    CREATE TABLE  "PROJECTTOLABASSOCIATION" 
       (     "VERSIONNO" NUMBER(*,0), 
         "PROJLABASSOID" NUMBER(9,0), 
         "PROJID" VARCHAR2(20), 
         "LABID" VARCHAR2(20), 
         "PROJLABSTARTDATE" DATE, 
         "STATUS" VARCHAR2(20), 
         "ENDDATE" DATE, 
         "LABHIDDENDATE" VARCHAR2(20), 
         "PROJLABHIDDENDATE" VARCHAR2(20), 
         "PROJHIDDENDATE" VARCHAR2(20), 
          CONSTRAINT "PK_B37" PRIMARY KEY ("LABID", "PROJID", "PROJLABHIDDENDATE") ENABLE
       )
    
    CREATE TABLE  "ADDPATENT" 
       (     "VERSIONNO" NUMBER(*,0), 
         "PATID" NUMBER(9,0), 
         "PATTITLE" VARCHAR2(250), 
         "PATSTATUS" VARCHAR2(20), 
         "PATAPPDATE" DATE, 
         "PATSTATUSDATE" DATE, 
         "PATENTREJECTWITHDRAWNREASON" VARCHAR2(1000), 
         "PATNO" VARCHAR2(20), 
         "SRCHFIELD" VARCHAR2(20), 
         "FROMDATE" DATE, 
         "TODATE" DATE, 
         "OPERATOR" VARCHAR2(20), 
         "PATENTGEOGRAPHY" VARCHAR2(20), 
         "PAPERTYPE" VARCHAR2(20) DEFAULT 'dummy', 
         "PATENTURL" VARCHAR2(200), 
          CONSTRAINT "PK_A67" PRIMARY KEY ("PATID") ENABLE, 
          CONSTRAINT "UQ_PATENTTITLE" UNIQUE ("PATTITLE") ENABLE
       )
    
    CREATE TABLE  "PATENTTOPROJECTASSOCIATION" 
       (     "VERSIONNO" NUMBER(*,0), 
         "PATENTPROJASSOID" NUMBER(9,0), 
         "PATID" NUMBER(9,0), 
         "PROJID" VARCHAR2(20), 
         "PATENTPROJHIDDENDATE" VARCHAR2(20), 
         "STATUS" VARCHAR2(20), 
         "STARTDATE" DATE, 
         "ENDDATE" DATE, 
         "PROJHIDDENDATE" VARCHAR2(20), 
          CONSTRAINT "PK_A91" PRIMARY KEY ("PATID", "PROJID", "PATENTPROJHIDDENDATE") ENABLE
       )
    
    CREATE TABLE  "PATENTASSOCIATES" 
       (     "VERSIONNO" NUMBER(*,0), 
         "PATASSOID" NUMBER(9,0), 
         "PATID" NUMBER(9,0), 
         "ASSOCIATEID" NUMBER(9,0), 
          CONSTRAINT "PK_B67" PRIMARY KEY ("ASSOCIATEID", "PATID") ENABLE
       )
    
    CREATE TABLE  "ADDASSOCIATE" 
       (     "VERSIONNO" NUMBER(*,0), 
         "ASSOCIATEID" NUMBER(9,0) NOT NULL ENABLE, 
         "ASSOCIATENAME" VARCHAR2(100) NOT NULL ENABLE, 
         "CTOJOINDATE" DATE, 
         "STATUS" VARCHAR2(20), 
         "ENDDATE" DATE, 
         "SRCHFIELD" VARCHAR2(20), 
         "OPERATOR" VARCHAR2(20), 
         "FROMDATE" DATE, 
         "TODATE" DATE, 
          CONSTRAINT "PK_B23" PRIMARY KEY ("ASSOCIATEID") ENABLE
       )
    Now, I need a list of all patents sage associates for each laboratory.
    I have wirtten the following query. If I get the correct results, I get duplicate values. Each record is displayed at least 10 times. So if there are 4 partners for a given patent, it's ateleast back 40 records. I tried SINGLE. No results displayed.
    query2 = "SELECT tn1.associateName AS name " +
    "FROM AddLab al, AddProject ap, AddPatent p, ProjecttoLabAssociation pl, PatenttoProjectAssociation pp, " +
    "AddAssociate tn1, PatentAssociates tn2 " + 
    "WHERE " +
    "al.labID=pl.labID " + 
    "AND ap.projID=pl.projID " +
    "AND pl.projID=pp.projID " +
    "AND p.patID=pp.patID " +
    "AND pl.status = 'Active' " +
    "AND tn1.associateID = tn2.associateID " +
    "AND tn2.patID = '" + rs.getString("patID") + "' " +
    "order by al.labID";
    
    try
    {
    stmt = conn.createStatement();
    rs2 = stmt.executeQuery(query2);
    String associateNames = "";
                                            
    while(rs2.next())
    {
     associateNames += rs2.getString("ID") + ";\n";
    }

    Use the laureline or

    Use can use the the tn1.associateName group

    It seems that your use within java code here, I formatted as sql code. Fomat according to your requirement

    SELECT t.name FROM (SELECT tn1.associateName AS name,count(*)
    FROM AddLab al, AddProject ap, AddPatent p, ProjecttoLabAssociation pl, PatenttoProjectAssociation pp,
    AddAssociate tn1, PatentAssociates tn2
    WHERE
    al.labID=pl.labID
    AND ap.projID=pl.projID
    AND pl.projID=pp.projID
    AND p.patID=pp.patID
    AND pl.status = 'Active'
    AND tn1.associateID = tn2.associateID
    AND tn2.patID = '  rs.getString(patID)  '
    GROUP BY tn1.associateName
    order by al.labID) t;
    
  • The combination of several projects to Capture

    I'm a new user of Captivate 3, embark on my first project.

    I need to do a demonstration of software which will include multiple applications at different times on the desktop. The best way to proceed is, of course, is to record the entire desktop. However, I was worried about my ability to edit the project together that I thought. I really just want some raw images that I can move on, instead of getting the demo right the first time.

    My idea was to record each application on its own window and perform a particular function. I could then create an empty project; full screen for the reader flash in a web browser - 1014 x 713 (a non-standard size of office). I could then set the background color and add images on the start bar and a couple of icons; make it look realistic. Then I import my captured applications and position them where and when I want to.

    It works very well with full motion capture video but the standard image capture is part of the blade and if you change the slide background, you lose the image of the application. It does not record the image of the application as a separate object.

    Any ideas on how I should go about my project registration, all ensuring that I have the flexibility to make things a little more later?

    Thanks for your suggestions.

    Dominic

    Hi Dominic and welcome to the forums of Captivate!

    Your idea of capturing each application separately is a good thing. Allows you to maintain each in its own file of project, which makes things easier and improves performance in Captivate. You also avoid to try to capture the entire desktop to a weird resolution.

    If it was me, I consider it must be able to show the Windows Desktop behind each application... with the exception of a few slides where you might want to show that there are many open applications, you'll probably find you want each application in order to be as large as possible to avoid scroll or needing items appearing partially off the screen.

    If you want to really have 'small' application on a common background windows, capture each application to the desired size, but when imported in your master project, copy each context 'captured' project and paste it into your master image project. What makes 'float' and to be mobile/updated separated from the background of the mask. Do a "background" on each image, and you should be golden.

    I also recommend to do some testing before committing to 1014 x 713, especially in browsers-Internet Explorer. Mode full screen can be problematic, and you can find that something like 1000 x 650, other than full screen works better.

  • Get several lines with the request - please help

    Hello

    I have query that gives me the output below.
    select distinct a.*,cu1.usr_key,cu1.first_nm,cu1.last_nm
    from(
          select ng.grp_key, ng.grp_nm , gt.grp_typ_nm, stts.nm as grp_sts, ng.expiry_date, ng.updt_dttm, stts.stts_key
          from new_group ng, user_group ug, group_type gt, status stts
          where ug.grp_key = ng.grp_key and ng.grp_typ_key = gt.grp_typ_key and 
          ng.stts_key = stts.stts_key and
          ug.usr_grp_rl_typ_key = 1 and 
          lower(ng.grp_nm) like 'test foe%'
          union 
          select ng.grp_key, ng.grp_nm , gt.grp_typ_nm, sts.nm as grp_sts, ng.expiry_date, ng.updt_dttm, sts.stts_key
          from new_group ng, group_type gt, status sts
          where ng.grp_typ_key = gt.grp_typ_key and ng.stts_key = sts.stts_key and 
          lower(ng.grp_nm) like 'test foe%')a, common_user cu1, user_group ug1
    where cu1.stts_key = a.stts_key and cu1.usr_key = ug1.usr_key and ug1.usr_grp_rl_typ_key = 1 and ug1.grp_key(+) = a.grp_key;
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 09.38.34 29742 Sam Saed
    18345 enemy test remove Group organization DELETED 9 February 12 09.38.34 AM 3 29643 dummyName514 dummy
    18345 enemy test remove Group organization DELETED February 9, 12 09.38.34 AM 3 28917 TestMObileUser Gujral
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 27284 Rocky jegou 09.38.34
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 28920 Bhavani Gujral 09.38.34
    18345 enemy test remove Group organization DELETED 9 February 12 09.38.34 AM 3 29645 dummyFName516 dummy
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 27316 Karthik Gilani 09.38.34
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 28147 Bowl David Mathews 09.38.34
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 09.38.34 29731 Sam Saed
    18345 enemy test remove Group organization DELETED February 9, 12 AM 3 28919 Madhu mango 09.38.34

    For a group 18345, there are 10 users and this is the reason why I get a multiple user records.

    I can't avoid these last three columns, because I have to show these values in the application.

    In my opinion, the UNION is at the origin of the problem. Can I replace the UNION here? Please share your ideas on this.

    Thank you
    Rambeau

    Published by: ouali on February 9, 2012 22:35

    Hello

    because I have to show these values in the application.

    What is your problem then? If you simply issue a SELECT statement to application code or send the data back to REF CURSOR, it will be quite OK to have several lines. That's what the SELECT statements are for: to return sets of results with several lines.
    So, could not explain your problem more in detail please? If you get an error somewhere, provide the code causing the error and the error message (it is probably ORA-001422 exact extraction returns several lines somewhere in PL: / SQL, isn't it? then post here).

    In my opinion, the UNION is at the origin of the problem. Can I replace the UNION here? Please share your ideas on this.

    Us don't know not the answer to this question, because no one here knows your needs (what you need).

  • Extract the first line containing "critical" or "E-Stop" of the last avalanche of line

    Hi all

    I'm watching some test systems by analyzing their audit files.

    In this case, the platform generates several line 100 files in a specific folder. The code below is to find the last file and extract the contents of the last line of the last file.

    Unfortunately, when an error occurs, the main software generates not only one entry, but an avalanche of lines [not a specific quantity of them, depending on how much the alarms are resolved] and I'm now ideas of how I could identify and the contents of the first line containing "Criticism" or "E-Stop" to exit from this avalanche [line avalanche started 22.27].

    As an example, the above program is extract the yellow line, while I need information from the blue line.

    Any idea on how I can do this?

    See you soon,.

    You can add this snippet to the top of your existing code.  I changed the indicator table to a table so I could highlight the line.

Maybe you are looking for