Get First_Name and Last_Name like single column of table employee, separated by a "_"?

Name of the table: employee

Employee_id First name Last_name Salary Joining_date Department
1JohnAbraham10000001ST JANUARY 13 12.00.00 AMBanking services
2MichaelClarke8000001ST JANUARY 13 12.00.00 AMInsurance
3RoyThomas7000001ST FEBRUARY 13 12.00.00 AMBanking services
4TomJose6000001ST FEBRUARY 13 12.00.00 AMInsurance
5JerryPinto6500001ST FEBRUARY 13 12.00.00 AMInsurance
6PhilippeMathew7500001ST JANUARY 13 12.00.00 AMServices
7TestName11236500001ST JANUARY 13 12.00.00 AMServices
8TestName2Lname %6000001ST FEBRUARY 13 12.00.00 AMInsurance

Table name: incentives

Employee_ref_id Incentive_date Incentive_amount
1FEBRUARY 1, 135000
2FEBRUARY 1, 133000
3FEBRUARY 1, 134000
1JANUARY 1, 134500
2JANUARY 1, 133500


SQL

Hello

SELECT e.first_name. '_' || FOCA select e employee;

Is that what you ask?

Best regards

Bruno Vroman.

Tags: Database

Similar Questions

  • SQL - Multiple Fetch in a single column with a comma separator

    Hello Experts,
    Good day to all...

    I need your help on the following scenarios. The following query returns all channels titleID. Rather than print them one under the other as a result of the query, I want the output to be in the batch of 25 values.i.e than each line must have 25 values separated by commas. IE if there are 100 titles satisfying the output, then there should be only four lines with and each line with 25 titles in comma separated way.
    SELECT DISTINCT title_id
               FROM pack_relation
              WHERE package_id IN (      SELECT DISTINCT fa.package_id
                                                    FROM annotation fa
                                                GROUP BY fa.package_id
                                                  HAVING COUNT
                                                            (fa.package_id) <100);
    I tried with the PL/SQL block; Whereas it is printing all the values permanently :(
    I have to stop with 25 values and display.

    If its possible with SQL block alone. then it would be a great help

                                                           
                                                                          
    DECLARE
       v_str   VARCHAR2 (32767)  := NULL;
    
       CURSOR c1
       IS
         SELECT DISTINCT title_id
               FROM pack_relation
              WHERE package_id IN (      SELECT DISTINCT fa.package_id
                                                    FROM annotation fa
                                                GROUP BY fa.package_id
                                                  HAVING COUNT
                                                            (fa.package_id) <100);
    BEGIN
       FOR i IN c1
       LOOP
          v_str := v_str || ',' || i.title_id;
       END LOOP;
       v_str := SUBSTR (v_str, 2);
       DBMS_OUTPUT.put_line (v_str);
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line ('Error-->' || SQLERRM);
    END;
    Thank you...

    You can use CEIL

    Code example

    SELECT
        nt,
        LTRIM(MAX(SYS_CONNECT_BY_PATH(val,',')) KEEP (DENSE_RANK LAST ORDER BY curr),',') AS concat_val
    FROM
        (
            SELECT
                val,
                nt,
                ROW_NUMBER() OVER (PARTITION BY nt ORDER BY val)    AS curr,
                ROW_NUMBER() OVER (PARTITION BY nt ORDER BY val) -1 AS prev
            FROM
                (
                    SELECT
                        level                          AS val,
                        ceil(rownum/3)  as nt /* Grouped in batches of 3 */
                    FROM
                        dual
                        CONNECT BY level <= 10
                )
        )
    GROUP BY
        nt
        CONNECT BY prev = PRIOR curr
    AND nt              = PRIOR nt
        START WITH curr = 1;
    
            NT CONCAT_VAL
    ---------- --------------------------------------------------------------------------------
             1 1,2,3
             2 4,5,6
             3 7,8,9
             4 10
    

    Your code

    SELECT
        nt,
        LTRIM(MAX(SYS_CONNECT_BY_PATH(title_id,',')) KEEP (DENSE_RANK LAST ORDER BY curr),',') AS concat_val
    FROM
        (
            SELECT
                title_id,
                nt,
                ROW_NUMBER () OVER (PARTITion BY nt ORDER BY title_id)   AS curr,
                ROW_NUMBER() OVER (PARTITION BY nt ORDER BY title_id) -1 AS prev
            FROM
                (
                    SELECT
                        title_id,
                        ceil(rownum/25) AS nt /* Grouped in batches of 25 */
                    FROM
                        pack_relation tdpr
                    JOIN annotation fa
                    ON
                        tdpr.package_id = fa.package_id
                    GROUP BY
                        title_id,
                        fa.package_id
                    HAVING
                        COUNT (fa.package_id) < 500
                )
        )
    GROUP BY
        nt
        CONNECT BY prev = PRIOR curr
    AND nt              = PRIOR nt
        START WITH curr = 1;
    
  • Q. how get several results from a single column in a recordset using PHP

    Hello world

    I hope someone can help. I have a column called categories and about 5 categories listed. I want to show all the products listed in say 2 categories. I don't have that basic php skills so know only how to pass a value to the url to display the products of 1 category for example

    Select *.

    PRODUCT

    Category WHERE colname =

    $colname = $_GET ['category'];

    URL... page.php? category = result

    Question is how can I get products in several categories to show for instance all the products of the categories "fruits", "dairy products", 'meat '.

    Your help will be much appreciated, because I'm tired of beating my head against the wall. (should invent a pillow of wall PHP and sell online)

    Thank you

    $colname1 = $_GET ["category1"];

    $colname2 = $_GET ["Category2"];

    $colname3 = $_GET ["category3"];

    Select *.

    PRODUCT

    Category WHERE the ('$colname1', '$colname2', '$colname3')

    > Your help will be very appreciated because I'm tired of beating my head against the wall

    My guess is that you are trying to build a web application without first learning the basics of PHP and SQL. It is certainly the hard way.

  • How to get the list in a single column in a query

    Hello.

    I wonder if there is a way to get a query (no pl/sql code) a list of columns with a separator between them.

    I know I can get that without separators with an expression of cursor:
    SQL> with test_table as (
      2  select 1 col1, 'a' col2 from dual
      3  union
      4  select 1 col1, 'b' col2 from dual
      5  union
      6  select 1 col1, 'c' col2 from dual
      7  union
      8  select 2 col1, 'a' col2 from dual
      9  union
     10  select 2 col1, 'c' col2 from dual
     11  union
     12  select 2 col1, 'd' col2 from dual
     13  union
     14  select 2 col1, 'z' col2 from dual
     15  )
     16  select col1, cursor (select b.col2 from test_table b where b.col1 = a.col1 order by b.col2) col2_list from test_table a
     17  group by col1
     18  /
    
          COL1 COL2_LIST
    ---------- --------------------
             1 CURSOR STATEMENT : 2
    
    CURSOR STATEMENT : 2
    
    C
    -
    a
    b
    c
    
             2 CURSOR STATEMENT : 2
    
    CURSOR STATEMENT : 2
    
    C
    -
    a
    c
    d
    z
    But the result I want is (by using the separator ';'):
          COL1 COL2_LIST
    ---------- --------------------
             1 a;b;c
             2 a;c;d;z
    I don't know how to manage a cursor expression without using a pl/sql function block. Can it be done using analytical functions?

    Thanks in advance.

    Hello

    This is called 'aggregation of chain.
    This site:

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:2196162600402

    shows different ways to do this, including the SYS_CONNECT_BY_PATH solution which gave Blushadow.

    I got a lot of use of the first solution on this page, the function defined by the user STRAGG, that you can copy.

    Once you have installed STRAGG, your query is simply

    SELECT    col1
    ,         STRAGG (col2)     AS col2_list
    FROM      test_table
    GROUP BY  col1;
    

    The query above do not put items in a particular order.

    On Oracle 10 (and more) you can have a similar function, the WM_CONCAT (property WMSYS), already installed.
    WM_CONCAT is not documented, so you can't use it in your Production applications.

  • Disable the single column of Table

    Hi all

    It's perhaps something very stupid to ask.

    Would have a Table control in which two first column will not be editable by the user and remaining user.

    How can I go about disabling the two columns of the table control?

    Thanks in advance.

    The attached code turns off the first two rows, but to change it to columns simply change the value to unbundle to column.

  • Trying to create a Section to multiple columns with Sections of the single column before and after

    Is there a way to create a section break that is not default to a new page after I created columns on a page.  I created the columns and under them, I want to return to the normal formatting for the rest of the single page.  See picture attached.

    Any rejection of Pages v5 has a break of presentation which was present in the Pages ' 09 v4.3. This will allow you to transition to several columns and back to single column on the same page. In the v5 Pages, you can insert 3 text boxes and change the 3-column layout in the Middle text box. You use the toolbar item Insert to inject column breaks when you want to start a new list in the next column. I'll show this screenshot below.

    You can fake your layout in Pages v5 using 3 text boxes and setting 3 columns in the Central text area. Better to show the mode of provision for this and in a text box, the column outlines are not displayed. After each column list, you then choose column break the Insert point toolbar menu to move to the next column, add a list, repeat. Each column will expand downwards. Click on the following to enlarge.

    Pages ' 09 v4.3 using layout breaks Pages using 3 text boxes V5.6.1                                                      

      

  • Single-column-multi-Rows, columns by using Types of Collection

    Can you guys help me get the result after using types of collection or all the predefined collections?

    In fact, I'm trying to compare the results of the columns col1 and col2 against a single value, so try to get the output in a single column.

    Required output should be like

    SQL > with t as (1 select col1, col2 2 double)

    2 Select * from t;

    COL

    ----------

    1

    2

    Please suggest any solutions using regexp/connect by / or etc.

    Well, then:

    SQL> with t as (select 1 col1, 2 col2 from dual)
      2  select nt.column_value
      3  from t
      4     , table(sys.odcinumberlist(col1, col2)) nt
      5  ;
    
    COLUMN_VALUE
    ------------
               1
               2
    

    but it is overkill IMO.

  • 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

    ;

  • PanelBox and the single column Table

    Hi all

    I have a panelBox with a table T1 single column. I would like to add an array of columns more simple T2 right next to the first table T1.
    Jdev he added under the first table, but I want to be in the same line.

    Is this possible?


    Thank you
    Matthew

    Hi Matthew,

    How to add panelGroupLayout with a horizontal layout inside panelBox and put your tables inside the panelGroupLayout?

    Jean Lou

  • I forgot my password to get on my computer like im the main user and have my password need anything I don't have a reset disk

    I forgot my password to get on my computer like im the main user and have my password need anything I don't have a reset disk please help

    Hello, sxyria

    Unfortunately, we are unable to provide assistance in bypassing the security or the recovery of passwords.

    David
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows?

    I tried to download a pdf and convert them into excel, but the data in excellent is always to the image format.  How can I get the pdf data into the columns and rows so that I can do the calculations?

    If you start the https://forums.adobe.com/welcome Forums Index

    You will be able to select a forum for the specific Adobe products you use

    Click on the symbol "arrow down" on the right (where it is said to see all our products and Services) to open the drop-down list and scroll

  • I use a mac and would like to buy the package of Lightroom.  I had the trial and it was fine.  I was enrolled in the Belize and I get an error message saying that the country is not supported.  In the United Kingdom, I changed my region and I still get th

    I use a mac and would like to buy the package of Lightroom.  I had the trial and it was fine.  I was enrolled in the Belize and I get an error message saying that the country is not supported.  In the United Kingdom, I changed my region and I still get the same error message?

    Hello

    Try to subscribe through pricing and membership creative cloud plans | Adobe Creative Cloud

    Hope that helps!

    Kind regards

    Sheena

  • Somehow I can get the length of a segment of the timeline using only entry points and somehow like in FCP?

    Users of Adobe Premiere:

    Somehow I can get the length of a segment of the timeline using only entry points and somehow like in FCP?


    I want to get the exact length of timecode for some segments only, not the entire timeline. Can not know how to do this.

    If you set the entry points and in the program monitor, is indicated to the right:

  • Hello together! I already have Photoshop Elements and really like the program! Now, I want to buy Premiere Elements - can I get a discount?

    Hello together! I already have Photoshop Elements and really like the program! Now, I want to buy Premiere Elements - can I get a discount? (I've seen there is a double: Photoshop Elements + Premiere Elements available) Thanks for your help! Tobi

    I guess it depends where you bought Photoshop Elements. Did you buy it from a retailer or directly from Adobe?

    In any case, you will need to contact Adobe Customer Service to see if there is a discount. This is a user to user forum.

  • I use Photoshop elements on Windows 8.1 12.  When I go in the Expert Mode to change the available toolbar is displayed in a single column and missing several tools which foreground and background color.  How to restore the original toolbar?

    I use Photoshop elements on Windows 8.1 12.  When I go in the Expert Mode to change the available toolbar is displayed in a single column and missing several tools which foreground and background color.  How to restore the original toolbar?

    Try to re - set preferences.

    Go to: Edit > preferences > general (menu Photoshop Elements on Mac)

    Click on the button Reset preferences on the next launch

Maybe you are looking for

  • I can't access the "Général" tab in Options.

    I received recently a hijack browser following a summary program recommended by a friend. (Last time that I listen to.)I uninstalled the program but and restored my search engine, home page, page newtab and all that. (Some options, some through every

  • How to display a list of installed modules and extensions can capture print or text?

    When there are problems with the connection to Web site or display involving FF (but not IE) and to speak to a particular site for technical assistance, a request in line with the suite is to provide them with information on the modules and extension

  • How can I know if this 603G - UW15 from Acer came with a DVD burner and how to use it?

    I'm not familiar with Windows 8.1. Windows 7 and Vista on my other computers.  I want to make DVD and CD but does not know how to go on this issue.  I can't even say what programs are on this computer. I know apps are much used, but I still need prog

  • WAG160N assigns IP

    Hello! I have a WAG160N, some computers laptops and desktops at home. They all connect to the Wireless router. Desktop computers have a wireless Board that only supports 802. 11 b / g. When I try to connect to the router on the desktop, it is not ass

  • Dell V515W print head problem

    My printer has stopped working.  "I'm getting a ' there is a problem with the printhead" error.  I've cleaned and deep cleaned the print head.  Just before it began, my pages were all blue print.  Now, I can't clean clean/deep/align or anything becau