I want to display only compaing email_ids another table

Hi guys,.

By using this query I can divide the values having the comma separator.

Now, I want to display only compaing email_ids another moderator = userid column table.

Table column
email_tab username, email

Please can someone help me on this... Thanks in advance!

-LK

Edited by: sockalingam May 16, 2011 10:33

It is not clear what you are trying to achieve that you haven't told us the version of your database or provided no data for us to work with.

I'm guessing that you are splitting a string separated by commas and want to retrieve rows from a table based on these individual values?

Something like:

SQL> ed
Wrote file afiedt.buf

  1  select *
  2  from emp
  3  where ename in (
  4    with t as (select '&input_string' as txt from dual)
  5    select REGEXP_SUBSTR (txt, '[^,]+', 1, level)
  6    from t
  7    connect by level <= length(regexp_replace(txt,'[^,]*'))+1
  8*   )
SQL> /
Enter value for input_string: SCOTT,JAMES
old   4:   with t as (select '&input_string' as txt from dual)
new   4:   with t as (select 'SCOTT,JAMES' as txt from dual)

     EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
---------- ---------- --------- ---------- ------------------- ---------- ---------- ----------
      7788 SCOTT      ANALYST         7566 19-04-1987 00:00:00       3000                    20
      7900 JAMES      CLERK           7698 03-12-1981 00:00:00        950                    30

SQL>

Tags: Database

Similar Questions

  • data displayed only in the main table not shown in the child table

    I have two tables: master and child. In the main table, I want the first line of the main table must be selected and child records to be displayed when the page is displayed. But the page shows only the master records.

    The code written in the process in the controller application is:
    TheAM OAApplicationModule = pageContext.getApplicationModule (webBean);

    Table OATableBean = (OATableBean) webBean.findChildRecursive ("region1RN");
    Boolean ExecuteQuery = BooleanUtils.getBoolean (false);
    [Serializable] parameters = {executeQuery};
    Class [] paramTypes = {Boolean.class};

    theAM.invokeMethod ("init", parameters, paramTypes);

    the code written in AM is:
    public void init (Boolean executeQuery)

    {


    TXN OADBTransaction = getOADBTransaction();
    MTHSustainAspectsVOImpl vo = this.getMTHSustainAspectsVO1 ();

    Line masterRow = vo.first ();
    masterRow.setAttribute ("SelectFlag", "Y");
    vo.executeQuery ();


    }

    can someone tell me why the child records don't come

    Change the code as follows and try

    public void init (Boolean executeQuery)

    {

    TXN OADBTransaction = getOADBTransaction();
    MTHSustainAspectsVOImpl vo = this.getMTHSustainAspectsVO1 ();

    Line masterRow = vo.first ();
    masterRow.setAttribute ("SelectFlag", "Y");
    vo.executeQuery (); Not necessary
    vo.setCurrentRow (masterRow);

    }

    Prasanna-

  • Line display only 1 in a table view

    Pls... is there a way to display only 1 row in a table view (OBIEE 11 g)?

    (I know it's possible in the narrative view...)

    TXS

    A.L.

    Try with pagination option in a table view. You can display a single default line.

    Thank you

    Prasanna

  • How to get the message that I want to display only.

    Hello

    I use in my main power system which is connected with different instruments as a data logger, GSM, GPS...

    In my main vi all the Subvi electrical system, gsm etc. are interconnected.

    I would like to make a few changes,

    for example when I run my vi It should seems to jump to the top of msg as of course do your power supply works.

    and if assume that its not on then display the pop up msg that your power supply is turned off, then system must be turned off, means no need to continue the operation.

    Here I am attaching my vi, I did a logic in which concerns, in that when I run my main vi I get msg to make sure that the power supply works.

    but when the power supply is off, and then I got error msg like your power supply is turned off and after clicking ok error vi is open I don't want, that all the I have attached here.

    I want only msg that your power supply is turned off and then the system must be disabled, nothing more.

    you please guide me that this King of the changes that I needed to do this.

    Thank you much in advance.

    HIII, I thank you for your time.

    Finally, I got solved.i need to make only small cahnges in this stop button in any loop.here as an attachment, I put this solution.

  • The left join - no data in the table don't want to display the data from the table one

    Hello

    I'm writing a query. Here is my scenario, I have two tables EMP and EMP_TYPE. I want to join both the table and even if there is no matching record in the table for EMP EMP_TYPE, I want to return the record to the EMP table and empty values of EMP_TYPE.
    create table EMP
    (
      EMPID   NUMBER(10,2),
      EMPNAME VARCHAR2(100)
    );

    INSERT INTO emp (empid,empname) values (1, 'abc');
    INSERT INTO emp (empid,empname) values (2, 'xyz');
    INSERT INTO emp (empid,empname) values (3, 'UNJ');

    create table EMP_Type
    (
      ID          NUMBER(10,2),
      EMPID       NUMBER(10,2),
      TYPE_ID     NUMBER(10,2),
      END_DATE    DATE
    );

    INSERT INTO EMP_Type(id, empid, TYPE_ID, END_DATE) values (100, 2, 1, SYSDATE);

    select *
      from emp e
      left outer join emp_Type t
        on e.empid = t.empid
    and t.type_id = 1

    returns.

            EMPID     EMPNAME     ID             EMPID     TYPE_ID     END_DATE
         2.00             xyz            100.00     2.00             1.00             10/9/2012 5:18:59 PM
         3.00             UNJ                    
         1.00             abc                    


    select *
      from emp e
      left outer join emp_Type t
        on e.empid = t.empid
    and t.type_id = 1
    and t.empid = 3

    returns

            EMPID     EMPNAME     ID             EMPID     TYPE_ID     END_DATE
         2.00             xyz                 
         3.00             UNJ                    
         1.00             abc          

    but instead I want

            EMPID     EMPNAME     ID             EMPID     TYPE_ID     END_DATE
         3.00             UNJ                    

    Your conditions of conflict
    >
    and t.type_id = 1
    and t.empid = 3
    >
    There is a record with t.empid 3

    select *
      from empx e, empx_Type t
    where e.empid = 3
      and e.empid = t.empid (+)
    
    EMPID,EMPNAME,ID,EMPID_1,TYPE_ID,END_DATE
    3,UNJ,,,,
    
  • Entry list to display only 5 in the region from the list

    Dear friend

    I want to limit the entry of the list area of the list.

    I created an html region and create another part of list as a child of the HTML area.

    I created the dynamic list ABC. There are 30 entry in list in list ABC.

    I want to display only 5 ABC list entry in the list area and to know all the entered list user can click opton more at the bottom of the region.

    How can I restrict the list entry in the list area.

    Thank you

    query like this

    Select ename, empno from emp r d where ROWNUM<=>

    Leave.

  • We display only the columns required dynamically?

    Hi all

    I have a scenario where I have 30 columns in the rtf model. All columns will never be displayed, only a privileged few will be available for display. The output file is so see the empty columns. Now, I want to display only the columns that contain data.

    FYI - can't know what columns are made up of data until we run the report.

    Any advice.


    Thanks in advance.

    Malenfant.

    Hello

    You can use the following text:

    Column heading:
    My label

    The data in the column:
    My data

    The @column will tell XMLP wheater or not that column should be indicated.

    I hope this helps you.

    Kenneth BR

  • How we display only subordinate?

    I wanted to show only the child records. The sub query display starting with employee Scott and all his subordinates... But I want to display only subordinate... How can I display here... any help is appreicated.


    SELECT HIERARCHY_NAME
    OF T_HIERARCHY_CONVERT
    START WITH HIERARCHY_NAME = "Scott".
    CONNECT PRIOR HIERARCHY_NO = HIERARCHY_MGR_NO

    The other way

    select
         sys_connect_by_path(ename,'/') xc, level, connect_by_root ename
    from      emp
    connect by  prior empno =   mgr
    start with ename='SCOTT'
    /
    XC                                  LEVEL CONNECT_BY
    ------------------------------ ---------- ----------
    /SCOTT                                  1 SCOTT
    /SCOTT/ADAMS                            2 SCOTT
    

    Only subordinate.

    select
         sys_connect_by_path(ename,'/') xc
    from      emp
    where ename!='SCOTT'
    connect by  prior empno =   mgr
    start with ename='SCOTT'
    /
    XC
    ------------------------------
    /SCOTT/ADAMS
    
    OR
    select
         ename xc
    from      emp
    where ename!='SCOTT'
    connect by  prior empno =   mgr
    start with ename='SCOTT'
    /
    
    XC
    ------------------------------
    ADAMS
    

    SS

  • How to display only those items that are in the date

    Hello

    I have a new database and events for a nursery for children site I am building. I have no problem out of the news that I thought... but I'm having a problem with the events.

    I want to display only events that are dated. If the events that took place are no longer displayed. I don't want to delete events though, as I need to archive them.

    I have a date field in the table that is in the following DD MMM YYYY format (example: October 27, 2006).

    Is there a query I can do to select only events that have not occurred yet?

    Thank you

    This will give you the only current day events. Of course like Dan said that the dates must be stored in the field date.

    I'll call you datasource as "yourdatasource".
    Call your table as "yourtable.
    and by calling the column with the date as «DateColumn» field




    SELECT * from yourtable
    WHERE DateColumn = #dateob #.


    Then out it where you want...
    .....

  • Read integer values to worksheet and display the values in a table

    Hi all

    I have integer values to read from a worksheet and display them in a table. I uses 'Reading of the spreadsheet file' mode 'integer '. I want to display these values in a table. The problem is the table takes only 2d-array of string as input but not an integer.

    It works fine if I change 'Worksheet file playback' mode to 'integer' to 'chain', but I want to read integers and must use integer values for calculations more. Please give suggestions on the display of integers to a table.

    Thank you.

    Do not take not piece-by-piece just convert as a whole. See the attached example

    Good luck

  • TableName in another Table

    Hello

    I have a small question. I want to get a tabelname on another table.

    I have a question 'P1_xyz' (selection list). This select list returns a name of a table in my database.

    Now, I want to create a report (select * from...) where the part behind the keyword 'FROM' is in the item "P1_xyz". But it dosent work... The selection of the report do not show the two column...

    Can someone help me?

    Workspace: TEST_OA5
    Username: [email protected]

    password: Hund123


    There is a single application, you can find it, really!


    THX René

    Hi RWErene81,

    RWErene81 wrote:

    There is only one thing, that I need too. I need the original titles in the columns of the tables / views. How can I do that. in your SQL query all columns that are named by col01, col02...

    Can you explain or show me, how can I get the real column names?

    See the 586 page of your application. I've implemented the dynamic report headers depending on the selected table.

    That's what I did:

    • Page 586 - "Guard" report - column attributes - headers of Type-> set it to PL/SQL
    • Page 586 - "guard" report attributes - attributes of column - Type headers-> function of the sections of the colon delimited:
    DECLARE
    
      L_LABEL_STR VARCHAR2(32000);
    
    BEGIN
    
      -- get the column names if the table exists
      FOR REC IN ( SELECT COLUMN_NAME
                     FROM USER_TAB_COLUMNS
                    WHERE TABLE_NAME = UPPER(TRIM(:P586_TIERAUSWAHL))
                    ORDER BY COLUMN_ID )
      LOOP
        IF L_LABEL_STR IS NULL THEN
          L_LABEL_STR := REC.COLUMN_NAME;
        ELSE
          L_LABEL_STR := L_LABEL_STR ||':'|| REC.COLUMN_NAME;
        END IF;
      END LOOP;
    
      RETURN L_LABEL_STR;
    
    END;
    

    NOTE: in an opinion, here to show that I wrote directly the code into anonymous blocks for the dynamic query, as well as for the labels. You could make a formula with two functions and replace the anonymous by function calls as blocks:

    For the query:

    RETURN APP_REPORTS_PKG.FNC_GET_TIERE_QUERY (:P586_TIERAUSWAHL);
    

    Label:

    RETURN APP_REPORTS_PKG.FNC_GET_TIERE_LABEL (:P586_TIERAUSWAHL);
    

    I hope this helps!

    Kind regards

    Kiran

  • How to display data from the emp table?

    Hi everyone, this is my first post in this portal. I want to display the details of the table emp... for this I use this SQL statement.

    Select * from emp where mgr = nvl(:mgr,mgr);

    When I give the entry as 7698 it shows the matching records... and also when I don't give any input then it shows all the records except the Archbishop with null values.

    (1) I want to display all the records when I do not give any input, including null values
    (2) I want to display all the records that a Bishop is null

    Is it possible to integrate in order to include all these in a single query.

    Hello

    937440 wrote:
    Hi everyone, this is my first post in this portal.

    Welcome to the forum!
    Don't forget to read the forum FAQ {message identifier: = 9360002}

    I want to display the details of the table emp... for this I use this SQL statement.

    Select * from emp where mgr = nvl(:mgr,mgr);

    When I give the entry as 7698 it shows the matching records... and also when I don't give any input then it shows all the records except the Archbishop with null values.

    (1) I want to display all the records when I do not give any input, including null values
    (2) I want to display all the records that a Bishop is null

    Is it possible to integrate in order to include all these in a single query.

    It's a little unsure what you're asking.
    The following query always includes the lines where mgr is NULL and when the binding variable: mgr is NULL, it displays all the lines:

    SELECT  *
    FROM     emp
    WHERE     LNNVL (mgr != :mgr)
    ;
    

    In other words, when: 7698 = mgr, it displays 6 rows and when: mgr is NULL, it displays 14 rows (assuming you are using the table provided by Oracle scott.emp).

    The following query includes lines where Bishop is ZERO only when the binding variable: mgr is NULL, in which case it shows all lines:

    SELECT     *
    FROM     emp
    WHERE     :mgr     = mgr
    OR       :mgr       IS NULL
    ;
    

    When: mgr = 7698, this will display 5 rows and when: mgr is NULL, it displays 14 rows.

    The following query includes lines where Bishop is ZERO only when the link variab; e: mgr is NULL, in which case it shows only those rows where mgr is NULL. In other words, it treats NULL as a value:

    SELECT     *
    FROM     emp
    WHERE     DECODE ( mgr
                , :mgr, 'OK'
                )     = 'OK'
    ;
    

    When: mgr = 7698, this will display 5 rows and when: mgr is NULL, it displays 1 row.

  • My wallpaper appears only in the extended format. I want to display a .jpeg file into the center channel mode. I click on center and save the changes, but he remains in stretch mode...

    My wallpaper appears only in the extended format.  I want to display a .jpeg file into the center channel mode.  I click on center and save the changes, but he remains in stretch mode...

    HP technical support solves the problem for me with a patch: I'm sorry that I don't remember all the steps they walked me through but the patch was SP45575. EXE.   It was working fine.  Good luck

  • FFx displays only in the tiny size of the thumbnail since update

    Since FFx updated it displays only those things in a tiny size of the thumbnail. This should be a page full size of print is only an unreadable thumbnail.

    I have not modified parameters. On the file > menu print preview, it shows "reduced to adjust" and on the layout, it is set to portrait. All margins are set to half an inch.

    My Brother laser printer works normally when using the Chrome browser. Why so many problems lately with FFx?

    I don't know if this will help, but in another recent thread, the user has discovered that the problem was the preference:

    • printer_printer_name.print_paper_data

    It has been set at 256, and changing the value to 1 has solved the problem of paper size.

  • I want to thank my wifi in another part of the House with an Airport Extreme. But I want to not be connected to the modem main via ethernet cable is it possible?

    I want to thank my wifi in another part of the House with an Airport Extreme. But I want to not be connected to the modem main via ethernet cable is it possible?

    I put in place already to extend the wifi of my modem still connected to the modem via ethernet cable.

    Now I want to be considered on the floor and use it to extend the wifi without ethernet cable

    The AirPort Extreme can extend only wireless signal from another router from Apple, so if you want to take the AirPort Extreme on the floor and extend wireless signal, you will need another airport connected to your modem by Ethernet cable router to produce the wireless signal that will extend the extreme on the floor.

    Another way of saying the same thing would be to say that if you want to extend wireless using a router from Apple, you'll need two of them do... because AirPort Extreme is not compatible with a third-party modem or modem/router for this purpose.

Maybe you are looking for