How to return a single LINE with Multiple value separated by a colon in a SQL query

Hello

I have a SQL, as shown.
select deptno
  from dept
I want to mofidfy this query, so that it should return me departments with colon delimeted list in a ROW.
10:20:30:40.......
Thank you
Deepak

Tags: Database

Similar Questions

  • How to make a single line with 6-8 images in css?

    I would like to do a header line with 6-8 icons of different sizes and use them as links.  I can't get them to line up horizontally in a container. How can I do this?

    You can do this by making the area the same size icons. that is, all the images are the same size, it's just the icons in the image control that are different sizes.

    If you don't want to do this then probably a good reason to use a table with cells of 6/8 otherwise, you will need to adjust padding/margin on each icon to align individual, doable but somewhat tedious.

  • How to make a single image with multiple clickable points?

    Hello

    I just started using CS4 yesterday, but am quite confused. I managed my first realization with it, but am troubled havign. I don't yet know the capabilities of the software to be honest, but I would like to know if I can have one image, then have sections of it that can be flown with a tag and a link to another part of my site. Is this something that can be done?

    Thank you!

    If you click on your image in Design view and go to the properties panel > window > properties, you will see 3 blue icons down in the lower left corner. You can choose one and get a "hot spot" on the image. When you draw a hotspot Dreamweaver will provide you with an option to associate a link with it.

  • Arrow line (single line with an arrowhead) in MS Paint Win7

    Is there anyway that I can draw an arrow line (straigt single line with an arrowhead at the end) in the new MS Paint in Win7?

    The following items may be worth a visit:

    Windows 7 - paint help
    http://Windows.Microsoft.com/en-us/Windows7/using-paint

    Windows 7 - getting started with paint - tutorial
    http://Windows.Microsoft.com/en-us/Windows7/getting-started-with-paint

    Windows 7 - How to add an arrow to a screenshot
    http://www.allsandiegocomputerrepair.com/693/how-to-add-an-arrow-to-a-screenshot/

  • Search for value in the subset of data and returns a single line.

    Hello

    I wonder if you can help me with a query.

    I want to return a single line of data below

    where the Rno = 1 but also include a column to indicate a code of T555 tran was found in the subset (based on customer no)

    I used an analytic function (row_number) to enter the data in the following order and wonder if there is something similar for helping me understand the transaction code.

    Customer without Tran Code TranDate NWR

    1 T345 01/01/2001 1

    1 B455 01/01/1999 2

    1 T555 01/01/1998 3

    1 R433 01/01/1997 4

    1 "T543" 01/01/1996 5

    Thank you


    SQL> with t
      2  as
      3  (
      4  select 1 client_no, 'T345' tran_code, to_date('01/01/2001', 'dd/mm/yyyy') trandate, 1 rno
      5    from dual union all
      6  select 1 client_no, 'B455' tran_code, to_date('01/01/1999', 'dd/mm/yyyy') trandate, 2 rno
      7    from dual union all
      8  select 1 client_no, 'T555' tran_code, to_date('01/01/1998', 'dd/mm/yyyy') trandate, 3 rno
      9    from dual union all
     10  select 1 client_no, 'R433' tran_code, to_date('01/01/1997', 'dd/mm/yyyy') trandate, 4 rno
     11    from dual union all
     12  select 1 client_no, 'T543' tran_code, to_date('01/01/1996', 'dd/mm/yyyy') trandate, 5 rno
     13    from dual
     14  )
     15  select client_no
     16       , tran_code
     17       , trandate
     18       , rno
     19       , case when t555_cnt > 0 then 'YES' else 'NO' end t555
     20    from (
     21            select t.*
     22                 , count(decode(tran_code, 'T555', 1)) over() t555_cnt
     23              from t
     24             where client_no = 1
     25         )
     26   where rno = 1;
    
     CLIENT_NO TRAN TRANDATE         RNO T55
    ---------- ---- --------- ---------- ---
             1 T345 01-JAN-01          1 YES
    
    SQL>
    
  • How to display the line empty as a line with null values

    Hi all

    Pls advise me if it is possible to use a single query statement to display
    Empty row (i.e. not a single return line) as a line with null values.

    For example,.

    Select the names of names_mst whose name = "sgasfgs".

    Result:
    Names of
    =====
    < null >

    Hello
    If you desire to join external to double, as shown below, you still get at least a line of production

    SELECT  nm.names
    FROM            dual
    LEFT OUTER JOIN names_mst   nm  ON nm.name='sgasfgs';
    
  • I have a column with two values, separated by a space, in each line. How to create 2 new columns with the first value in a column, and the second value in another column?

    I have a column with two values, separated by a space, in each line. How do I create 2 new columns with the first value in one column and the second value in another column?

    Add two new columns after than the original with space separated values column.

    Select cell B1 and type (or copy and paste it here) the formula:

    = IF (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    shortcut for this is:

    B1 = if (Len (a1) > 0, LEFT (A1, FIND ("", A1) −1), ' ')

    C1 = if (Len (a1) > 0, Member SUBSTITUTE (A1, B1 & "", ""), "")

    or

    the formula of the C1 could also be:

    = IF (Len (a1) > 0, RIGHT (A1, LEN (A1) −FIND ("", A1)), "")

    Select cells B1 and C1, copy

    Select cells B1 at the end of the C column, paste

  • Replace the carriage return or new line with a table space

    Hello

    I want to replace the carriage return or new line with space in my column of the database.

    To do this, I'm using this query:

    Select replace (replace (Comments, chr (10),' '), Chr (13),' ') OF Comments_Master

    Comments_Master is the name of the table and comments is column that contains carriage return or new line.

    But this query works as expected.

    Once I run this query and run the query again "select * FROM Comments_Master", transport return and new line still exist.

    Please let me know what is wrong with this query?

    You write that data back you? This example shows that your sql should work. I thinnk the query that you just described is the updated one below.

    create table blah (text varchar2 (100));

    insert into bla values (' it's multi)

    line of text ");"

    Select * from blah.

    Select replace (replace (text, chr (10),' '), Chr (13),' ') of bla.

    Update text bla = replace (replace (text, chr (10),' '), Chr (13),' ');

    Select * from blah.

  • Updated several lines with different values

    Hello!
    I have a problem. I need to update more than 1000 lines with different values. How can I do?
    For exsample I have table:
    ID; color, date,
    1 red
    2 green
    3 white

    I need to update the date field.

    Update table
    Set date = '01.02.03'
    where id = 1

    Update table
    Set date = '01.03.03'
    where id = 2


    Maybe it's how to update multiple rows in a single request?

    Sorry for my bad English.
    Thank you!

    Hello

    You can try this

    UPDATE TABLE SET DATE = CASE
                        WHEN ID = 1 THEN TO_DATE('01-02-03','DD-MM-RR')
                        WHEN ID = 2 THEN TO_DATE('01-03-03','DD-MM-RR')
                        END
    

    see you soon

    VT

  • Web Forms using substitution variables with multiple values

    Hello

    I'm trying to select a substitution variable in a WebForm (Hyperion Planning 11.1.1.3) with multiple values in environmental assessments, but does not does someone knows if this expected behavior.

    I already try.

    & month = "Jan", "Feb", "Mar".
    & month = Jan, Feb, Mar
    & month = Jan: Mar

    Please let me know something, since I remember in previous versions of Hyperion Planning it was possible.

    Kind regards

    Reading of:- Re: use of the Variables of Essbase alternative forms of planning

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • How to combine several single pdf files into a single PDF with multiple pages?

    How to combine several single page pdf files into a PDF file with multiple pages?

    Hi Sandra,.

    You have ExportPDF subscription to Adobe not associating the files for you. It is only used to convert PDFS into different formats.

    To combine PDF you could to buy the different subscription: Pack PDF

    Let me know if you have any questions

    Kind regards

    ~ Dominique

  • How do to return a single line or all lines if condition satisfied or not satisfied?

    Database: 10.2.0.4

    I have data like this:
    with tab as
    (
    select 'id1' as id, 'b' as atype from dual union all
    select 'id1' as id, 'h' as atype from dual union all
    select 'id2' as id, 'b' as atype from dual union all
    select 'id2' as id, 'a' as atype from dual union all
    select 'id2' as id, 'v' as atype from dual
    )
    select * from tab;
    
    id1     b
    id1     h
    id2     b
    id2     a
    id2     v
    I want result, identification with atype = 'h', then this line should be returned; If an ID is atype = 'h' then returns all of the rows for this ID. Thus, the sample above should return:
    id1     h
    id2     b
    id2     a
    id2     v
    Can I do this in SQL only? The table has about 2 million lines with several other columns

    Thank you
    SC

    Something like:

    with tab as
    (
    select 'id1' as id, 'b' as atype from dual union all
    select 'id1' as id, 'h' as atype from dual union all
    select 'id2' as id, 'b' as atype from dual union all
    select 'id2' as id, 'a' as atype from dual union all
    select 'id2' as id, 'v' as atype from dual
    )
    select  id,
            atype
      from  (
             select  id,
                     atype,
                     sum(case atype when 'h' then 1 else 0 end) over(partition by id) h_indicator
               from  tab
            )
      where atype = 'h'
         or h_indicator = 0
    /
    
    ID  A
    --- -
    id1 h
    id2 a
    id2 v
    id2 b
    
    SQL> 
    

    SY.

  • How to manage the current line with radio button selection?

    Hello world

    I have an ADF page with a table and a search"" button.
    I created a new attribute with VARCHAR2 (1) in the VO and dragged this attribute as the first column of the table. And changed this first column of the option button to select only a single line at a time.
    By clicking on the "Search" button, I need to get the current selected row values.

    How can I get the values of selected line?
    What code should I write to get the values of the selected line in the method of binding the button 'search '?

    All suggestions will be really useful.

    Thank you.

    Hello Kumar,
    I have a few comments on your case.
    >
    I created a new attribute with VARCHAR2 (1) in the t
    >
    1. you should create this attribute in the object of the entity, and then add it to the view object.
    2-do you need this radio that a button is defined for all lines? If yes then you need handle the case where the user set several lines and clear the value of the attribute for all other lines.

    >
    How can I get all the values of the current row in backing bean, binding of the Find method (method)?
    can u please give me the code for this?
    >
    If you mean by the current row is the row for which the value of the selected attribute is defined (the radio button is set to the rank), then you can write a method in the viewObjectImpl class and expose it to the customer interface and call it from your bean.
    Here is a sample Department table in the HR schema.

    //This method is written in DepartmentsViewImpl
    public Row getSelectedRadioRow(){
                //create a second row set to not impact the row set used in ADF
                RowSet duplicateRowSet = this.createRowSet("duplicateRowSet");
                //get the current row of the table to set it back after re-executing the VO
                DepartmentsViewRowImpl currentRow = (DepartmentsViewRowImpl)this.getCurrentRow();
                Row[] filteredRows = duplicateRowSet.getFilteredRows("IsSelected", "1");
                DepartmentsViewRowImpl row=null;
                if(filteredRows.length>0){
                    row = (DepartmentsViewRowImpl)filteredRows[0];
                    System.out.println("Department Name " + row.getDepartmentName());
                     }
                this.setCurrentRow(currentRow);
                duplicateRowSet.closeRowSet();
                return row;
            }
    
  • How to set up single-line message headers?

    Previously, in the message display area, I had configured Thunderbird so that a message appears that the subject of the message in the message header section just above the body of the message. But I just upgraded to to 38.1.0 and now I have in reserve, [address], in the header box, although I've seen-> headers-> Normal (Compact) set.

    Please tell us how to get back to the option just to display the subject line. Real estate vertical display is much too precious to not having the capacity of the old view of a single line.

    Thank you
    [email protected]

    Install this add on.

    https://addons.Mozilla.org/en-us/Thunderbird/addon/compactheader/?src=HP-DL-featured

    The normal headers view removes the routing information only. It has nothing to do with what you are trying to accomplish.

  • How to return to the line in the text field

    I created a form with a text field, but by filling out the form, the words don't word wrap, but just go in a single line across the field to text box.

    When can I format the text box for the return to the line?

    TKS

    Under the Options tab of the Properties dialog box, you can set the Multiline field.

Maybe you are looking for

  • Ken Burns still grayed out picture

    I want to be able to hold the last image of a photo in a Ken Burns effect zoom for a break on the topic of the effect. When I try to freeze the last image, "freeze frame" is grayed out. I tried to add the same photo after the first without the KB eff

  • Is Apple pencil exclusively for the writing/drawing?  Or, can it be used as an older stylus?

    I've been using a stylus with my iPad more old to move objects in applications (my favorite moves the puzzle pieces) and would like to know if the new "pencil" can also work like this, or is it only for writing?

  • We could overclock the CPU of the Satellite A200 - 1 GB?

    Hi all How I see the temperature of the CPU of my A200 - 1 GB.I can't see it in the bios. Is there any application provided by Toshiba or Vista. Another thing, it is that we can over clock the CPU of the A200 - 1 GB?IF it is possible, which is the wa

  • Loading XP on a totally wiped hard drive

    I completely erase the hard drive of my laptop and I want now to load XP on but what I see is a command line based and I can't figure out how to get the CD with Windows to run. Any help out there?

  • Images on Images

    Is it possible to add a BMP to a fieldview Manager and insert something on top of it (such as a button), while the first image serves as the background?