concatenate the 4 columns - but if null?

im making a concatenation like that on 4 columns

Column1 | ',' || Column2 | ',' || Column3 | ',' || Column4 as mycategories


But if 3 of the 4 columns are null I get

test4

is there a way to display only the commas if the field is a value?

Maybe

ltrim(column1 || nvl2(column2,',','') || column2 || nvl2(column3,',','') || column3 || nvl2(column4,',','') || column4,',')

Concerning

Etbin

Edited by: Etbin on 30.4.2012 17:47
LTRIM added

Tags: Database

Similar Questions

  • I want to get only year sysdate with my name of the defined column. but not able to get it.

    I want to get only year sysdate with my name of the defined column. but not able to get it.

    SQL > select to_char (sysdate, 'yyyy') as 'mahesh tyagi' from dual;

    Mahé

    ----

    2015

    SQL > select to_char (sysdate, 'yy') as 'Manu' from dual;

    my

    --

    15

    So I couldn't do 'Manu' or "mahesh tyagi" as the column name.

    The column name is "mahesh tyagi" is simply displayed it shortened to sqlplus due to the known values in the column length.

    create table year_test select to_char (sysdate, 'yyyy') "mahesh tyagi" double;

    year_test / / DESC

    You can change the way sqlplus displays the header of column with something like

    column "mahesh tyagi" format a15

  • A target table is in charge of two different sources but the same columns, but a source is one database and another in a flat file.

    We all hope you are doing well.

    I have a business problem to implement in ODI 11 G. It's here. I'm trying to load a target table from two sources that have the same column names. But a source is to the file format and the other is in the Oracle database.

    That's what I think I'll create two mappings in the same interface by using the Union between the sources. But I don't know how the interface would connect to different logical architecture to connect to two different sources.

    Thank you

    SM

    You are on the right track, all in a single interface. Follow these steps

    (1) pull model of your data in the designer of the source file and your table model target to the target pane.

    (2) all relevant columns map

    (3) in the source designer to create a new dataset and choose as the UNION join type (this will create a separate tab in the source designer pane)

    (4) select the new dataset tab in the source designer pane and pull your source oracle table data model in the designer of the source. All columns that are relevant to the target card

    (5) make sure that your staging location is set to a relational technology i.e. in this case the target would be an ideal candidate because it is where the ODI will organize the data from source two files and oracle and perform the UNION before loading to the target

    If you want to watch some pretty screenshots showing the steps above, take a look at http://odiexperts.com/11g-oracle-data-integrator-part-611g-union-minus-intersect/

  • Value of the analytical column changing to NULL in RDF

    Hello everyone.

    For the column in the existing query in RDF, which is used by one of the analytical column as a source.
    If the request is get changed according to the requirement of bussiness, the source of the analytical column evolves with the NULL value.

    Is there a way do not allow this change in RDF. Because many changes of the query are done. And it consumes a lot of time to change sources of the used analytical columns.

    Appreciate your help.

    Thank you.

    In general, this shouldn't happen. You defined ALIAS' are appropriate for the column that inspired the summaryitems?

  • Cannot set the JTable column width

    I got into difficulty JTable column widths. The table is placed inside a get. I use getColumnModel () .getColumn () .setPreferredWidth () for each of the JTable columns but when displayed, they are all the same size. If I understand setAutoResizeMode (array. AUTO_RESIZE_OFF), I get the same results (only the table is not fill the frame). I created a short program that exhibits this behavior. What Miss me?
    package testTableData;
    
    import java.awt.Dimension;
    import java.util.ArrayList;
    
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.SwingUtilities;
    import javax.swing.table.AbstractTableModel;
    
    public class TableData {
    
         private ArrayList<String>  col0 = new ArrayList<String>();
         private ArrayList<Integer> col1 = new ArrayList<Integer>();
         private ArrayList<Integer> col2 = new ArrayList<Integer>();
         private TableDataModel model = new TableDataModel();
         private JTable table = null;
         private JScrollPane scrollPane;
         
         TableData() {
              table = new JTable(model);
              table.setAutoResizeMode(table.AUTO_RESIZE_OFF);
              table.setPreferredSize(new Dimension(300,300));
             table.getColumnModel().getColumn(0).setPreferredWidth(200);
             table.getColumnModel().getColumn(1).setPreferredWidth(50);
             table.getColumnModel().getColumn(2).setPreferredWidth(50);
              scrollPane = new JScrollPane(table);
         }
    
         public JScrollPane getScrollPane() { return(scrollPane); }
         
         public void add(int index, String c0, Integer c1, Integer c2) { 
              col0.add(index, c0);
              col1.add(index, c1);
              col2.add(index, c2);
              model.fireTableStructureChanged(); 
         }
         
         class TableDataModel extends AbstractTableModel {
              private String[] columnNames = { "Col0", "Col1", "Col2" };
             public String getColumnName(int col) { return columnNames[col].toString(); }
             public int getRowCount() { return col0.size(); }
             public int getColumnCount() { return columnNames.length; }
             public Object getValueAt(int row, int col) {
                 if(col == 0) 
                      return(col0.get(row));
                  else if(col == 1)
                      return(col1.get(row));
                  return(col2.get(row));
             }
             public boolean isCellEditable(int row, int col) { return false; }
             public Class getColumnClass(int c) { return getValueAt(0, c).getClass(); }
         }
    
         public static void main(String args[])
         {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                      TableData td = new TableData();
                       td.add(0, "AAAAA",  0,  1);
                      td.add(1, "BBBBBBBBB", 10, 11);
                      td.add(2, "CCCCC", 20, 21);
                      
                     JFrame frame = new JFrame();
                      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                      frame.setSize(400,400);
                      frame.add(td.getScrollPane());
                      frame.setVisible(true);
                }
            });
         }
    }

    model.fireTableStructureChanged ();

    Each time you call this method recreates the JTable the TableColumnModel that re-creates all the TableColumns for column widths to get back to their default values.

    I see no reason that you need to create a custom TableModel. Just use the DefaultTableModel. You can load the template with the default data or dynamically update the model using addRow/removeRow methods.

  • See the region if the recordset field is (not) "null."

    Facing another problem. The solution is probably going to be very simple, but so far I have not thought of her. That's what I'm looking for:

    Say you have a page with the title, the introduction of message and a news reading, more button. The table in which the ballots are stored got 5 columns:

    • ID (primary key, I)
    • date_entry (timestamp)
    • newstitle
    • newsintroduction
    • newsmessage (may be NULL)

    As you can see, the "newsmessage" column can be NULL because sometimes there are short messages. What I want to know is, if the "newsmessage" column is null, on the page that displays the records of news, the link "read more" should not be visible. It should show only when the "newsmessage" column is "not null", so got content inside.

    Thank you!

    Is this really a region you want to show or hide? I guess it could be, but DW normally like it better when the "region" is its own row of the table. I don't know how much time, even when I do not select the TR tag in the property inspector and apply a show or Hide Server behavior, DW still places the code inside the TR tag in the source code.

    So, basically, want you want to do is wrap the a tag that contains the text read more, in an If statement. I don't have the exact syntax for you, my PHP skills are still developing. Maybe an other people could help - or if you do not have a behavior show or hide (when the recordset is empty or non-empty), take a look at the way this code is structured and use it as a guide. But if you use Null/Not Null as your requirement, make sure that the field contains a null value.

  • How can I change the size of the text column universally?

    I have created a book of a customer to ID CS4. The client decided that he would like a more narrow column of text throughout the book. (Each chapter of the book is its own file). I thought that this could be accomplished by going on the master pages, change margins and reapply the master pages, but it does not work. It does not change the text column, but the image containing the text does not change with it. Except changing the image manually, is there a way to change the existing dimensions of text column universally in a chapter? (I hope I'm being clear on what I'm asking.)

    This would have worked "as what" If the executives were on master pages, I think, but always possible even without master frames if executives adjustment the margins of the page. The secret is 'layout adjustment' which must be turned on before making changes in the margin.

    Go to the Layout > setting layout... and turn on, then make your changes on the master page. No doubt, you're ready for oversets that the adjustment of the width of the frame is likely to cause.

    Peter

  • using outer joins if the two column is null? Use only (+)

    Hi all

    create the table xxc_tr_num (tl_number number, tr_no number tl_no_id);

    insert into xxc_tr_num values (123,100,222);

    insert into xxc_tr_num values (124,100,333);

    create the table xxc_od_tab (tl_number number, tl_id number);

    insert into xxc_od_tab values (123,001);

    insert into xxc_od_tab values (null, null);

    create table xxc_oth_tab (name varchar2 (10), number of tl_id);

    insert into xxc_oth_tab values('abc',,001);

    insert into xxc_oth_tab values (null, null);

    Wait it out put

    tr_no tl_no_id name

    100 222 abc

    100 333

    using outer joins if the two column is null? use only please of outer joins

    And I tried to use outer joins on both tl_id column but not get values and I use have County (tr_no ) > 1

    Rajesh123 wrote:

    Thank you Kiss it is not possible to use having clause?

    You need to understand the functioning of the group. If you will not be asked this question.

    Check this box

    SQL> select tr_no,
      2         tl_no_id,
      3         count(*)
      4    from xxc_tr_num a,
      5         xxc_od_tab b,
      6         xxc_oth_tab c
      7   where a.tl_number = b.tl_number(+)
      8     and b.tl_id = c.tl_id(+)
      9   group
     10      by tr_no
     11       , tl_no_id;
    
         TR_NO   TL_NO_ID   COUNT(*)
    ---------- ---------- ----------
           100        333          1
           100        222          1
    

    See what returns the count? You have grouped according to TR_NO and TL_NO_ID. You must take into consideration the TL_NO_ID just put COUNT (TR_NO) does not increase the NUMBER of the whole group. To get the NUMBER on the whole group, I used the analytical function and did. Like this, see the number of the analytical function here

    SQL> select tr_no,
      2         tl_no_id,
      3         count(*),
      4         count(*) over(partition by tr_no)
      5    from xxc_tr_num a,
      6         xxc_od_tab b,
      7         xxc_oth_tab c
      8   where a.tl_number = b.tl_number(+)
      9     and b.tl_id = c.tl_id(+)
     10   group
     11      by tr_no
     12       , tl_no_id;
    
         TR_NO   TL_NO_ID   COUNT(*) COUNT(*)OVER(PARTITIONBYTR_NO)
    ---------- ---------- ---------- ------------------------------
           100        222          1                              2
           100        333          1                              2
    

    So to answer your question, yes you can't do in the HAVING clause...

  • Concatenate the date and time that are stored in two different date columns

    Hello

    I have to select date two columns from two different tables a date and another over time.

    I want to concatenate these two columns and format the result form dd/mm/yyyy hh24

    But I get error invalid number

    For example

    create table as datetime

    (select to_date (' 21/01/2014 ',' dd/mm/yyyy') as dt, to_date('08:00','hh24:mi') like double MC

    )

    Select to_char(dt||) TM, "dd/mm/yyyy hh24") of datetime

    I use oracle 10 g

    Help, please.

    Hello

    Roger wrote:

    ... If you need to take the party date to a date column and the time of anonther part, then you must first convert them to a string, concatenate them and convert them to date.

    You don't need to do this.  What you have described is a way to do it, but this isn't the only way.

    If d1 and d2 are the two DATEs, you can get year, month and day of d1 combined with hours, minutes, and seconds from d2 liike this:

    TRUNC (d1) and (d2 - TRUNC (d2))

    Nesting TO_DATE and TO_CHAR in Oracle, is almost never the best way to do anything.  Oracle provides many functions (for example, TRUNC) to manipulate dates, but also of DATE arithmetic.

  • Trying to hide a column but the header reappear on the following pages

    Hi all

    Here is my little problem, I have a table, a bit normal. What I try to do is the following:

    I wish I could hide a full column based on the data. I was actually able to hide a column, but my problem is that when the table breaks into a second page, "header cell" on the second page of the column I hid reappear.

    Here's how I did my stash:

    -In table Initialize script, I check a condition, and if this condition is met, I'm hiding the header cell.

    If (Verif.name4_we.rawValue == "" or Verif.name4_we.isNull) then

    HeaderRow.Cell3.presence = "hidden".

    endif

    -For normal lines, I always check the same exact condition and if the condition is met, I hide the cell.

    If (data. Page1.test.Table1.Verif.name4_we. RawValue == ' ' or data. Page1.test.Table1.Verif.name4_we. IsNull) then

    .its presence $ = "hidden".

    endif

    This facility works pretty well if I only have one page:

    Before.png
    5 is my header name (I know it might be confusing, I'm sorry), it's page 1, column 6, and 7 are in fact hidden.

    It's what happens on the following pages:

    after.png
    As you can see, only the header reappear, you can clearly see that the elements are still hidden, but because the header appear, it looks
    as there was a full column.

    Does anyone have an idea of what could be my problem?

    Thank you very much!
    Max

    Are you able to change the width of your columns?

    This is the last trip, I did:

    You must first, double-click the rule to open the palettes of drawing AIDS (or go into the top-> palettes-> drawing AIDS menu) and set the units to Points.

    You need tables and a structure, a table which will show real information and a structure that will be imported into your program with the correct width (column DialogResult.Cancel will have a value of 0.001 in the structure). The structure is hidden in the page layout.

    In your table initialize script, write something like this:

    Set the width of columns by using our structure.//Empty imported have a width of 0.001

    var width = Concat (data. Page1.struct.Col1, "pt."

    data. Page1.struct.col2, "pt."

    data. Page1.struct.col3, "pt."

    data. Page1.struct.COL4, "pt."

    data. Page1.struct.col5, "pt."

    data. Page1.struct.col6, "pt."

    data. Page1.struct.col7, "pt."

    data. Page1.struct.COL8, "pt."

    data. Page1.struct.col9, "pt."

    data. Page1.struct.col10, "pt")

    Table.columnWidths = width

    Explanation: You concatenate each rawValue of your table that contains the width of your columns with "pt" (the unit), in this way, you can set the widths of all columns in a single command (Table.columnWidths = width).

    This should resize the entire column, including the header. (It works on my side)

    Don't bother to ask if you have any other questions

    Max

  • an alphabet by typing in a cell gives drop down suggestions from previous hits on the same column. But how the drop down to choose the suggestions of the other columns and other sheets.

    an alphabet by typing in a cell gives drop down suggestions from previous hits on the same column. But how the drop down to choose the suggestions of the other columns and other sheets.

    Hi mdsavol,

    Your observations are accurate. The 'suggestions' are previous entries in the same column that correspond to what has been entered so far in the active cell. The only direct user control is to activate the function turn on or off in numbers preferences > general.

    There are other ways to include or exclude items of suggestions:

    • To remove typos in the suggestions list, the user must correct the typos in the cell above the active cell. If they are more in the list, they won't be presented as suggestions.
    • To include selections added to the list, the user must enter these suggestions in the individual cells above the active cell and column where they are wanted as suggestions.

    There was a request here a while there is a list of suggestion 'live' similar to those of some websites, which offers a descending list of possible entries as a type in an input box.

    The only way I see to reach a solution similar to what you have asked is to use as many lines at the top of the non-en-tete of the table section to list the items likely to repeat in your table, and then hide the lines. You'll need a list for each column where you want to use this feature with a list previously planted. Existing items will then require a likely hit up to three, then a click to choose from a list small enough to enter a value into a cell. News he will need to enter in full the first time, but after that it will be put on the list and answer the same thing as the terms preseeded.

    While your setting upward (or decide not to do), consider going on the menu of number (in numbers), choosing to provide feedback from numbers and writing a feature in Apple request. Describe what you want. Explain how he could help the average user numbers, and then hope for the best.

    Kind regards

    Barry

  • SQL Loader - ignore the lines with "rejected - all null columns."

    Hello

    Please see the attached log file. Also joined the table creation script, data file and the bad and throw the files after execution.

    Sqlldr customer in the version of Windows-

    SQL * Loader: release 11.2.0.1.0 - Production

    The CTL file has two clauses INTO TABLE due to the nature of the data. The data presented are a subset of data in the real world file. We are only interested in the lines with the word "Index" in the first column.

    The problem we need to do face is, according to paragraph INTO TABLE appears first in the corresponding CTL lines file to the WHEN CLAUSE it would insert and the rest get discarded.

    1. statement of Create table : create table dummy_load (varchar2 (30) name, number, date of effdate);

    2. data file to simulate this issue contains the lines below 10. Save this as name.dat. The intention is to load all of the rows in a CTL file. The actual file would have additional lines before and after these lines that can be discarded.

    H15T1Y Index | 2. 19/01/2016 |

    H15T2Y Index | 2. 19/01/2016 |

    H15T3Y Index | 2. 19/01/2016 |

    H15T5Y Index | 2. 19/01/2016 |

    H15T7Y Index | 2. 19/01/2016 |

    H15T10Y Index | 2. 19/01/2016 |

    CPDR9AAC Index | 2. 15/01/2016 |

    MOODCAVG Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |

    3. the CTL file - name.ctl

    DOWNLOAD THE DATA

    ADD

    IN THE TABLE dummy_load

    WHEN (09:13) = "Index".

    TRAILING NULLCOLS

    (

    COMPLETED name BY ' | ',.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

    IN THE TABLE dummy_load

    WHEN (08:12) = "Index".

    TRAILING NULLCOLS

    (

    COMPLETED name BY ' | ',.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

    invoke SQL loader in a file-> beats

    C:\Oracle\product\11.2.0\client\bin\sqlldr USERID = myid/[email protected] CONTROL=C:\temp\t\name.ctl BAD=C:\temp\t\name_bad.dat LOG=C:\temp\t\name_log.dat DISCARD=C:\temp\t\name_disc.dat DATA=C:\temp\t\name.dat

    Once this is run, the following text appears in the log file (excerpt):

    Table DUMMY_LOAD, charged when 09:13 = 0X496e646578 ('Index' character)

    Insert the option in effect for this table: APPEND

    TRAILING NULLCOLS option in effect

    Column Position Len term Encl. Datatype name

    ------------------------------ ---------- ----- ---- ---- ---------------------

    NAME                                FIRST     *   |       CHARACTER

    RATE                                 NEXT     *   |       CHARACTER

    EFFDATE NEXT * |       CHARACTER

    SQL string for the column: ' TO_DATE (: effdate, "MM/DD/YYYY").

    Table DUMMY_LOAD, charged when 08:12 = 0X496e646578 ('Index' character)

    Insert the option in effect for this table: APPEND

    TRAILING NULLCOLS option in effect

    Column Position Len term Encl. Datatype name

    ------------------------------ ---------- ----- ---- ---- ---------------------

    NAME                                 NEXT     *   |       CHARACTER

    RATE                                 NEXT     *   |       CHARACTER

    EFFDATE NEXT * |       CHARACTER

    SQL string for the column: ' TO_DATE (: effdate, "MM/DD/YYYY").

    Record 1: Ignored - all null columns.

    Sheet 2: Cast - all null columns.

    Record 3: Ignored - all null columns.

    Record 4: Ignored - all null columns.

    Sheet 5: Cast - all null columns.

    Sheet 7: Discarded - failed all WHEN clauses.

    Sheet 8: Discarded - failed all WHEN clauses.

    File 9: Discarded - failed all WHEN clauses.

    Case 10: Discarded - failed all WHEN clauses.

    Table DUMMY_LOAD:

    1 row loaded successfully.

    0 rows not loaded due to data errors.

    9 lines not loading because all WHEN clauses were failed.

    0 rows not populated because all fields are null.

    Table DUMMY_LOAD:

    0 rows successfully loaded.

    0 rows not loaded due to data errors.

    5 rows not loading because all WHEN clauses were failed.

    5 rows not populated because all fields are null.


    The bad file is empty. The discard file has the following

    H15T1Y Index | 2. 19/01/2016 |

    H15T2Y Index | 2. 19/01/2016 |

    H15T3Y Index | 2. 19/01/2016 |

    H15T5Y Index | 2. 19/01/2016 |

    H15T7Y Index | 2. 19/01/2016 |

    CPDR9AAC Index | 2. 15/01/2016 |

    MOODCAVG Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |

    H15TXXX Index | 2. 15/01/2016 |


    Based on the understanding of the instructions in the CTL file, ideally the first 6 rows will have been inserted into the table. Instead the table comes from the line 6' th.

    NAMERATEEFFDATE
    H15T10Y Index2January 19, 2016



    If the INTO TABLE clauses were put in the CTL file, then the first 5 rows are inserted and the rest are in the discard file. The line 6' th would have a ""rejected - all columns null. "in the log file. "


    Could someone please take a look and advise? My apologies that the files cannot be attached.

    Unless you tell it otherwise, SQL * Loader assumes that each later in the table and what clause after the first back in the position where the previous left off.  If you want to start at the beginning of the line every time, then you need to reset the position using position (1) with the first column, as shown below.  Position on the first using is optional.

    DOWNLOAD THE DATA

    ADD

    IN THE TABLE dummy_load

    WHEN (09:13) = "Index".

    TRAILING NULLCOLS

    (

    name POSITION (1) TERMINATED BY ' | '.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

    IN THE TABLE dummy_load

    WHEN (08:12) = "Index".

    TRAILING NULLCOLS

    (

    name POSITION (1) TERMINATED BY ' | '.

    rate TERMINATED BY ' | '.

    COMPLETED effdate BY ' | '. ' TO_DATE (: effdate, "MM/DD/YYYY").

    )

  • Arrange the tiles in a column, but multiple lines

    When you have the tiles on The start screen of Metro , you can set the group / block a tile only, but when you want to add the second tile to this group / block, you can put only horizontally (from left or right tile existed), in other words, you can add the column within that group, but you can put the new Tile vertically , under a tile already existence.

    I want to define group / block of tiles with a single column, but multiple lines.
    For example, instead of this:
    xx xx xx    xx
    xx          xx    xx
    to get this:
    xx x xx    xx
    xx x xx    xx
    Screenshot:

    Hi Mike b. II.

    It's normal. You cannot have tiles in groups vertically. Now in your case, if you change the tiles to large tiles, they will stack vertically.

  • Concatenate two columns and store it in the existing column

    Hi all

    I created a form based interactive report and need help on that. In the report, I want to display a column with label the CANDIDATE's FULL NAME by concatenating the existing columns in the same table.

    Am mentioning the details and the following questions:

    Table name: CANDIDATE_DETAILS

    Column 1: CANDIDATE_FNAME (first name) Data Type: CHAR (50)

    Column 2: CANDIDATE_LNAME (family name) the data type: CHAR (50)

    Column 3: CANDIDATE_FULLNAME (full name) Data Type: CHAR (100)

    If in the case of column 3 that is, CANDIDATE_FULLNAME is not created in the database, I could have written in query to create one using the concatenation of columns 1 and 2 of the column

    ALTER TABLE CANDIDATE_DETAILS ADD CANDIDATE_FULLNAME TANK (100 CHAR)

    AS (CANDIDATE_FNAME |) ' ' || ( CANDIDATE_LNAME)

    Since then, I have already created CANDIDATE_FULLNAME column, I just change or simply store the concatenation of Column1 and Column2. I tried to use under request, but his does not work:

    ALTER TABLE CANDIDATE_DETAILS

    CHANGE CANDIDATE_FULLNAME ACE (CANDIDATE_FNAME |) ' ' || CANDIDATE_LNAME)

    Also I'm checking the code under SQL Workshop-> SQL commands by entering the query below and his works fine.

    Select CANDIDATE_FNAME. ' ' || CANDIDATE_LNAME

    of 'CANDIDATE_DETAILS '.

    but do not know where to enter this code in "The Page Creator" that without creating an additional column in the database my needs can be met.

    Please let me know if you need more information and really appreciate any assistance.

    Thank you

    Verhasselt

    Hello

    If the requirement is to display the columns and their contents concatenated in a third, you can try this:

    1. create a new column in the report by adding code to the selection of the report:

    Select CANDIDATE_FNAME, CANDIDATE_LNAME, "'"CANDIDATE_FULLNAME"'CANDIDATE_DETAILS'"

    2. in the page editor, select the "CANDIDATE_FULLNAME" column and his correspondents "formatting of column" > "HTML Expression" describe what you like:

    #CANDIDATE_FNAME # #CANDIDATE_LNAME #.

  • update of NULL in the column with the values of the adjacent column

    Examples of data

    with test_data as
    (select 1 as one, null as two, 2 as three,5 as four, 6 as five, null as six from dual
    union all
    select 1 as one, null as two, 2 as three,5 as four, 6 as five, null as six from dual)
    select * from test_data;
    

    This is one of those cases, the case may be where any value of a column can be null

    or two similar columns can be null. If the column is null then I want to update the adjacent column

    average value of the column, if the first column is null so I want to take the next non-null column and update, if the last column is null

    so I want to take prev not zero column and to update.

    In this case would be my expected output

    Un Two Three Four Five Six
    11.52566
    123566

    Prospects for the future the suggesion or advice.

    Or, using Analytics:

    SQL> with test_data (id, one, two, three, four, five, six) as (
      2    select 1, 1   , null, 2   , 5, 6, null  from dual union all
      3    select 2, 1   , null, 3   , 5, 6, null  from dual union all
      4    select 3, 1   , null, null, 5, 6, null  from dual union all
      5    select 4, null, null, null, 5, 6, null  from dual
      6  )
      7  select *
      8  from (
      9    select id
     10         , cell
     11         , case when next_nn is not null and prev_nn is not null
     12             then (next_nn + prev_nn)/2
     13             else nvl(next_nn, prev_nn)
     14           end val
     15    from (
     16      select id
     17           , cell
     18           , val
     19           , last_value(val) ignore nulls over(partition by id order by cell) as prev_nn
     20           , first_value(val) ignore nulls over(partition by id order by cell range between current row and unbounded following) as next_nn
     21      from test_data
     22      unpivot include nulls (val for cell in (one as 1, two as 2, three as 3, four as 4, five as 5, six as 6) )
     23    )
     24  )
     25  pivot ( min(val) for cell in (1 as "ONE", 2 as "TWO", 3 as "THREE", 4 as "FOUR", 5 as "FIVE", 6 as "SIX") )
     26  ;
    
            ID        ONE        TWO      THREE       FOUR       FIVE        SIX
    ---------- ---------- ---------- ---------- ---------- ---------- ----------
             1          1        1,5          2          5          6          6
             2          1          2          3          5          6          6
             3          1          3          3          5          6          6
             4          5          5          5          5          6          6
    

Maybe you are looking for