How to divide a column (row) with a '&' delimited string by several lines

Hello

I need to divide a column of data in several rows as shown below. Could someone help me solve this problem

CREATE TABLE TEMP_ASS_BOOK
(
book_id NUMBER,
BOOK_TYPE VARCHAR2 (50 BYTE),
BOOK_NAME VARCHAR2 (50 BYTE),
ASS_BOOK VARCHAR2 (100 BYTE)
)

and data as below:

Insert into TEMP_ASS_BOOK
(BOOK_ID, BOOK_TYPE, BOOK_NAME, ASS_BOOK)
Values
(1, SCIENCE, 'PHYSICAL INTER', 'JP & THISTLE & SPECTRUM SERIES SERIES SERIES');
Insert into TEMP_ASS_BOOK
(BOOK_ID, BOOK_TYPE, BOOK_NAME, ASS_BOOK)
Values
(2, MATH, "MATH INTER', 'RK SERIES SERIES SPECTRUM & GVK SERIES');



Now, I need to insert this data into another table as below:

CREATE TABLE ASS_BOOK
(
book_id NUMBER,
BOOK_TYPE VARCHAR2 (50 BYTE),
BOOK_NAME VARCHAR2 (50 BYTE),
ASS_BOOK VARCHAR2 (100 BYTE)
)

now insert data from TEMP_ASS_BOOK to ASS_BOOK as below:

1 1 SCIENCE PHYSICS INTER SERIES JP
2 1 SCIENCE PHYSICS INTER SERIES THISTLE
3 1 INTER SPECTRUM PHYSICAL SCIENCE SERIES
4. 2 MATH MATH INTER SERIES RK
5 2 MATH MATH INTER SPECTRUM SERIES
6 2 MATH MATH INTER GVK SERIES

Thanks in advance.

I agree with knani, it is not necessary to resort to a procedure...

However, if you do not use the PL/SQL easier and more understandable code to do the job:

declare
cursor books is select * from temp_x_book;
begin
  for b in books loop
     for i in 1..length(b.x_book)-length(replace(b.x_book,'&'))+1 loop
         insert into x_book (BOOK_ID,BOOK_TYPE,BOOK_NAME,X_BOOK)
                     values (b.book_id,b.book_type,b.book_name,regexp_substr(b.x_book, '[^&]+', 1, i));
     end loop;
  end loop;
end;
/

Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com/2009/12/27/inviare-email-dal-db-utilizzando-utl_smtp/]

Tags: Database

Similar Questions

  • How to divide the column Date OBIEE

    Hello
    We have the name of the date column: To_Date and the format is DD/MM/YY hh.
    How to divide the date in YEARS, MONTHS, DAY as new columns.
    kindly help on that.


    Kind regards.
    CHR

    Published by: 867932 on November 23, 2011 22:18

    Hi user,

    All 3 functions can be written in RPD too. MDB layer, duplicate the date column-> the mapping tab to column of Goto-> expression-> functions Builder Select-> calendar Date functions / hour-> select DayofMOnth function. The column of your logic formula will look like,

    DayofMonth (YourDateColumn)

    Rgds,
    DpKa

  • How to load the file tabs with field-delimited a comma in an external table

    I am trying to create an external table in oracle 11 g r2. the script is as below. It fails if the field contains commas.

    for example, the following data will not be loaded.

    ERT 123, poipoipoi, yutio 567

    Please suggest how to solve this problem. Thank you!

    CREATE TABLE external_interaction
    (
    TAX_ID NUMBER (8).
    pubmed_id_list varchar2 (36),
    interaction_id_type varchar2 (36)
    )
    EXTERNAL ORGANIZATION
    (TYPE ORACLE_LOADER
    THE DEFAULT DIRECTORY ET_NCBI_DIR
    ACCESS SETTINGS
    (records delimited by 0 x '0A'
    jump 1
    BADFILE et_ncbi_log_dir: 'interactions.bad'
    Et_ncbi_log_dir LOG file: 'interactions.log'
    fields terminated by '\t '.
    missing field values are null
    REJECT ROWS WITH ALL FIELDS ARE NULL
    (
    TAX_ID,

    pubmed_id_list,
    interaction_id_type
    )
    )
    LOCATION (ET_NCBI_DIR: "interactions")
    )
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;

    Thanks for the reply.

    Should I use

    collumn_name tank (2000) in the table creation script because it is larger than the default char (255)

  • How can I insert a row with columns on drive XI

    I already checked help and I never gave no opportunity to select or modify a table.

    CNTRL-BACK does not work either

    Not possible with Adobe Reader or Adobe Acrobat.

  • Merge with VB Script ascii_diadem_9.1_or_later.zip .csv files: how to add the column/channel with filename

    Hello

    I use ascii_diadem_9.1_or_later.zip to merge the data from several .csv files.

    The problem is that I am so some weird futuristic timestamps in a channel

    which do not appear in the original .csv files:

    How to adjust the VB Script automatically adds a new channel to the a .csv resulting

    file with the original name of the .csv file for debugging purposes?

    Any help is greatly appreciated!

    Thanks, Katharina

    Hi Katharina,

    What happens when you drag your tiara BROWSER or Windows Explorer data files in the data portal?  See all date/time values in a table in VIEW of this channel?  The problem may be that you do not have a use but which properly load your data files.  The example is designed to show you how to concatenate several files of data together, but assumes that you could provide / have your own use.  If you use work already, then look for these lines to the top of the VBScript and substituting the name of your use "CSV".  If your files have a file extension different "*.csv", then you must also change the line "FileExt '.

    FileExt  = ' CSV files, *.» CSV »  ' « *. DAT; *. CSV '.
    Use = "CSV" ' "' or 'SpecificDataPluginName '.

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • How to display a column value with chain?

    Hai all,

    SELECT name from TAB1;

    output: JAGAN

    RAMU

    SIVA

    Sanjay

    So my requirement is to display these data in string (with single Quotes) as below.

    "JAGAN.

    "ROBERT."

    'SHIVA '.

    "Sanjay".

    I would like to know if it is possible...

    Thanks in advance...

    Jagadekara Reddy

    Hello

    Yes it is possible, try this

    SELECT "' | name | " '

    OF TAB1;

  • How not to omit binary zeros with the format string

    I use the format to a string to serial data format.  The problem I have is that in the format identifier string "%b" Format omits leading zeros

    in the string...   That is to say...  '3' becomes '11', when I need like "0011".

    See figure:

  • Update with the Lead feature and several lines

    I have a table such as:

    Table1:

    OrderNumber EFFECTIVE_DATE EFFECTIVE_END_DATE FileName

    123 11/5/2015-12/31/2099 File5.txt

    123, 7/11/2015-12/31/2099 File7.txt

    or it can look like:

    Table2

    OrderNumber EFFECTIVE_DATE EFFECTIVE_END_DATE FileName

    123 11/5/2015-11/7/2015 File5.txt

    123, 7/11/2015-11/9/2015 File7.txt

    123 11/9/2015-12/31/2099 File9.txt

    123 11/15/2015-12/31/2099 File15.txt

    I want to take the 2nd to the last EndDate and update with the previous value.

    So in fact, it would look like this.

    Table1:

    OrderNumber EFFECTIVE_DATE EFFECTIVE_END_DATE FileName

    123 11/5/2015-11/7/2015 File5.txt

    123, 7/11/2015-12/31/2099 File7.txt

    or

    Table2

    OrderNumber EFFECTIVE_DATE EndDate FileName

    123 11/5/2015-11/7/2015 File5.txt

    123, 7/11/2015-11/9/2015 File7.txt

    123-11/9/11/15 to 2015/2015 File9.txt

    123 11/15/2015-12/31/2099 File15.txt

    I got it work in a select statement to a single value. now I just need help it enter an UPDATE statement and update all records.

    SELECT W.EFFECTIVE_DATE, W.EFFECTIVE_END_DATE,

    NVL (LEAD (W.EFFECTIVE_DATE, 1) (ORDER implementation W.EFFECTIVE_DATE), December 31, 99 ') AS 'EFFECTIVE_DATE_NEW '.

    OF WH_ORDERS_REPORT W

    WHERE ORDERNUMBER = '10460992';

    It did not work:

    UPDATE WH_ORDERS_REPORT WH

    SET EFFECTIVE_END_DATE = (SELECT NVL (LEAD (WH2. EFFECTIVE_DATE, 1) (ORDER of WH2. (EFFECTIVE_DATE), DECEMBER 31, 99 ')

    OF WH_ORDERS_REPORT WH2

    WHERE WH. ORDERNUMBER = WH2. ORDERNUMBER)

    I appreciate your help in the creation of an update statement to do this.

    Rap, but it's working now.  I'll confirm with a few other records before I mark as correct, but what I see so far, it is beautiful, thank you!

    merge into WH_LIFELINE_ORDERS_REPORT D

    a_l'_aide_de)

    Select

    DISTINCT ORDERNUMBER,

    CURRENTSTATUSDATETIME,

    NVL (LEAD(EFFECTIVE_DATE, 1) ON (ORDERNUMBER partition

    (EFFECTIVE_DATE order), December 31, 99 ') as EFFECTIVE_END_DATE

    of WH_LIFELINE_ORDERS_REPORT

    ) S

    WE (D.ORDERNUMBER = S.ORDERNUMBER

    AND D.CURRENTSTATUSDATETIME = S.CURRENTSTATUSDATETIME

    )

    When matched then

    setting a day of set D.EFFECTIVE_END_DATE = S.EFFECTIVE_END_DATE;

  • Insert the statement with the subquery to insert several lines

    Hi friends,

    Please find below mentioned query and error. Also suggest me to go forward.

    SQL > INSERT INTO FM_TRAN_DOC_NO (TDOC_COMP_CODE,

    2 TDOC_TRAN_CODE,

    TDOC_ACNT_YEAR 3,.

    TDOC_CUR_NO 4,.

    TDOC_MAX_NO 5,.

    TDOC_CAL_YEAR 6,.

    TDOC_PERIOD 7,.

    TDOC_DIVN_CODE 8,.

    TDOC_DEPT_CODE 9,.

    TDOC_CR_UID 10,

    TDOC_CR_DT 11,

    TDOC_UPD_UID 12,

    13 TDOC_UPD_DT)

    14 SELECT '001',

    15 (SELECT DISTINCT FM_TRAN_DOC_NO TDOC_TRAN_CODE

    16               '6',

    17               '0',

    18 '9999',

    19 NULL,

    20 NULL,

    21 NULL,

    22 NULL,

    23 "AGT,"

    24 TO_DATE (SYSDATE),

    25 NULL,

    26 TO_DATE (SYSDATE) FROM DUAL;

    (SELECT DISTINCT FM_TRAN_DOC_NO TDOC_TRAN_CODE),

    *

    ERROR on line 15:

    ORA-01427: einreihig subquery returns multiple rows

    +Untested.

    When values except 'TDOC_TRAN_CODE' are hardcoded, there is no need to select double.

    Something like that?

    INSERT INTO FM_TRAN_DOC_NO)

    TDOC_COMP_CODE,

    TDOC_TRAN_CODE,

    TDOC_ACNT_YEAR,

    TDOC_CUR_NO,

    TDOC_MAX_NO,

    TDOC_CAL_YEAR,

    TDOC_PERIOD,

    TDOC_DIVN_CODE,

    TDOC_DEPT_CODE,

    TDOC_CR_UID,

    TDOC_CR_DT,

    TDOC_UPD_UID,

    TDOC_UPD_DT

    )

    SELECT DISTINCT

    '001',

    TDOC_TRAN_CODE,

    « 6 »,

    '0',

    "9999",

    NULL,

    NULL,

    NULL,

    NULL,

    "AGT,"

    TO_DATE (SYSDATE),

    NULL,

    TO_DATE (SYSDATE)

    OF FM_TRAN_DOC_NO;

  • How to write a query to return rows with the varchar column that contains even a single occurrence of the characters, such as Ÿ and

    How to write a query to return rows with the varchar column that contains even a single occurrence of the characters, such as Ÿ and

    I have a table whose columns with values such as

    MINNEAŸPOLIS and ¿VV ¿A

    Only the characters that are allowed in this column are alphabets, numbers, spaces, points and supports.

    Please help to write a SQL SELECT with Regexp_like query or any other option.

    Thanks to you all! Under query worked for me. Thank you Frank to explain the concept of hooks inside regexp_like.

    SELECT * FROM testspecial, WHERE REGEXP_LIKE (sampletext, "[^] ^ A - Z ^ a - z ^ 0-9 ^ [^.]") ^ {^} ^]') ;

  • How to fill a column with numbers and maintain when adding or deleting lines?

    So far, I've discovered two ways to fill a column with the number:

    1. Enter '1' in a single cell, '2' in the one below, select both, and then use the yellow dot to drag down - it will do the rest.

    2 create a formula such as 'A2 + 1' and drag also.

    However, in both cases it will work if I manually this continues to do for each newly added line at the bottom. Now, that alone would not be that big of a problem if it wasn't for the fact that I'm working with a table where the lines can be added among other rows in the future.

    Having said that, could someone please tell me how to create a column with a number that will increase automatically? I mean - if I add a new line between line 56 and 57, I want the new line to have a '57"in it, and the" old 57 "would now be"58"and so on." " I don't want to drag the whole column, which can be hundreds if not more than a thousand lines.

    Try to put this in the cells in the column:

    = ROW()

    In the formula, you can add or subtract a number if necessary to get the starting number that you need.

    SG

  • Mr President, how can I enter two rows at the same time with different default values that only the first line to use see?

    Mr President.

    My worm jdev is 12.2.1

    How to enter two rows at the same time with different default values that only the first line to use see?

    Suppose I have a table with four fields as below

    "DEBIT" VARCHAR2(7) , 
      "DRNAME" VARCHAR2(50),
      "CREDIT" VARCHAR2(7) , 
      "CRNAME" VARCHAR2(50),
    

    Now I want that when I click on a button (create an insert) to create the first line with the default values below

    firstrow.png

    So if I click on the button and then validate the second row with different values is also inserted on commit.

    The value of the second row are like the picture below

    tworows.png

    But the second row should be invisible. It could be achieved by adding vc in the vo.

    The difficult part in my question is therefore, to add the second row with the new default values.

    Because I already added default values in the first row.

    Now how to add second time default values.

    Concerning

    Mr President

    I change the code given by expensive Sameh Nassar and get my results.

    Thanks once again dear Sameh Nassar .

    My code to get my goal is

    First line of code is

        protected void doDML(int operation, TransactionEvent e) {    
    
            if(operation != DML_DELETE)
                 {
                     setAmount(getPurqty().multiply(getUnitpurprice()));
                 } 
    
            if (operation == DML_INSERT )
                       {
                               System.out.println("I am in Insert with vid= " + getVid());
                           insertSecondRowInDatabase(getVid(),getLineitem(),"6010010","SALES TAX PAYABLE",
                            (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                           }
    
            if(operation == DML_UPDATE)
                              {                                                    
    
                                 System.out.println("I am in Update with vid= " + getVid());
                             updateSecondRowInDatabase(getVid(),
                                 (getPurqty().multiply(getUnitpurprice()).multiply(getStaxrate())).divide(100));      
    
                              }                      
    
            super.doDML(operation, e);
        }
        private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object value4, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "Insert into vdet (VID,LINEITEM,DEBIT,DRNAME,AMOUNT) values " +
                 "('" + value1 + "','" + value2 + "','" + value3 + "','" + value4 + "','" + value5 + "')";  
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }
                  }  
    
                  private void updateSecondRowInDatabase(Object value1, Object value5)
                  {
                    PreparedStatement stat = null;
                    try
                    {
                      String sql = "update vdet set  AMOUNT='"+ value5+"' where VID='" + value1 + "'";                     
    
                      stat = getDBTransaction().createPreparedStatement(sql, 1);  
    
                      stat.executeUpdate();
                    }
                    catch (Exception e)
                    {
                      e.printStackTrace();
                    }
                    finally
                    {
                      try
                      {
                        stat.close();
                      }
                      catch (Exception e)
                      {
                        e.printStackTrace();
                      }
                    }                  
    
                  }
    

    Second line code is inside a bean method

        public void addNewPurchaseVoucher(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("VoucherView1Iterator");
                   RowSetIterator rsi = dciter.getRowSetIterator();
                   Row lastRow = rsi.last();
                   int lastRowIndex = rsi.getRangeIndexOf(lastRow);
                   Row newRow = rsi.createRow();
                   newRow.setNewRowState(Row.STATUS_NEW);
                   rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);
                   rsi.setCurrentRow(newRow);
    
                   BindingContainer bindings1 = BindingContext.getCurrent().getCurrentBindingsEntry();
                   DCIteratorBinding dciter1 = (DCIteratorBinding) bindings1.get("VdetView1Iterator");
                   RowSetIterator rsi1 = dciter1.getRowSetIterator();
                   Row lastRow1 = rsi1.last();
                   int lastRowIndex1 = rsi1.getRangeIndexOf(lastRow1);
                   Row newRow1 = rsi1.createRow();
                   newRow1.setNewRowState(Row.STATUS_NEW);
                   rsi1.insertRowAtRangeIndex(lastRowIndex1 +1, newRow1);
                   rsi1.setCurrentRow(newRow1);
        }
    

    And final saveUpdate method is

        public void saveUpdateButton(ActionEvent actionEvent) {
            // Add event code here...
    
            BindingContainer bindingsBC = BindingContext.getCurrent().getCurrentBindingsEntry();      
    
                   OperationBinding commit = bindingsBC.getOperationBinding("Commit");
                   commit.execute(); 
    
            OperationBinding operationBinding = BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit");
            operationBinding.execute();
            DCIteratorBinding iter = (DCIteratorBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("VdetView1Iterator");// write iterator name from pageDef.
            iter.getViewObject().executeQuery();  
    
        }
    

    Thanks for all the cooperation to obtain the desired results.

    Concerning

  • Report model of column named with 2 lines/registration poster null in the top row

    I was able to create a report model of column named with 2 rows by record type for a tabular presentation, but it seems to hide only the first line of the original registration and displays the 2nd row, i.e. all NULL values. All other records appear correctly.

    Here is the HTML code for the page that results for the init_row of the report. I understand why he behaves this way, but I have no idea how to do the style of the first < tr > Reports to the 2nd line of the record.
    <tr id="init_row_R1009150109271352230" style="display:none;" >
    <td rowspan="2"><a href="javascript:ShowRegion('')" >(null)</a></td>
    <td rowspan="2">(null)</td>
    <td rowspan="2">(null)</td>
    <td rowspan="2"><label for="f04_0000" class="hideMeButHearMe">Completion Date#ROW_HEADER#</label><span style="white-space: nowrap;"><input type="text"  id="f04_0000" name="f04" maxlength="2000" size="12" value="" autocomplete="off"></span></td>
    <td>Premises</td>
    <td><label for="f07_0000" class="hideMeButHearMe">Vacant#ROW_HEADER#</label><input type="text" name="f07" size="5" maxlength="2000" value=""  id="f07_0000" /></td>
    <td><label for="f08_0000" class="hideMeButHearMe">Delinked#ROW_HEADER#</label><input type="text" name="f08" size="5" maxlength="2000" value=""  id="f08_0000" /></td>
    <td><label for="f09_0000" class="hideMeButHearMe">Soft Dt#ROW_HEADER#</label><input type="text" name="f09" size="5" maxlength="2000" value=""  id="f09_0000" /></td>
    <td><label for="f10_0000" class="hideMeButHearMe">Ull Poi#ROW_HEADER#</label><input type="text" name="f10" size="5" maxlength="2000" value=""  id="f10_0000" /></td>
    <td><label for="f11_0000" class="hideMeButHearMe">Ported#ROW_HEADER#</label><input type="text" name="f11" size="5" maxlength="2000" value=""  id="f11_0000" /></td>
    <td><label for="f12_0000" class="hideMeButHearMe">Blocked#ROW_HEADER#</label><input type="text" name="f12" size="5" maxlength="2000" value=""  id="f12_0000" /></td>
    </tr>
    <tr>
    <td>Path</td>
    <td><label for="f13_0000" class="hideMeButHearMe">Path Vacant#ROW_HEADER#</label><input type="text" name="f13" size="5" maxlength="2000" value=""  id="f13_0000" /></td>
    <td><label for="f14_0000" class="hideMeButHearMe">Path Delinked#ROW_HEADER#</label><input type="text" name="f14" size="5" maxlength="2000" value=""  id="f14_0000" /></td>
    <td><label for="f15_0000" class="hideMeButHearMe">Path Soft Dt#ROW_HEADER#</label><input type="text" name="f15" size="5" maxlength="2000" value=""  id="f15_0000" /></td>
    <td><label for="f16_0000" class="hideMeButHearMe">Path Ull Poi#ROW_HEADER#</label><input type="text" name="f16" size="5" maxlength="2000" value=""  id="f16_0000" /></td>
    <td><label for="f17_0000" class="hideMeButHearMe">Path Ported#ROW_HEADER#</label><input type="text" name="f17" size="5" maxlength="2000" value=""  id="f17_0000" /></td>
    <td><label for="f18_0000" class="hideMeButHearMe">Path Blocked#ROW_HEADER#</label><input type="text" name="f18" size="5" maxlength="2000" value=""  id="f18_0000" /></td>
    </tr>
    <tr>
    Any ideas to try would be greatly appreciated. I tried to use conditions on the values of #ROWNUM #, but the null line is still there...

    And yes I know I should not use the tabular forms, but sometimes what is wanted, it is not what is better... :-)

    See you soon,.
    Greg

    Published by: snowman on 4 December 2012 15:12

    Published by: snowman on 4 December 2012 15:13

    See + {: identifier of the thread = 1116477} +.

    Sorry, I forgot all that when I suggested that you can use a custom here report model (not surprisingly, since I did not use the tabular forms given that these changes have been made).

    I don't remember see potential customization discussed in 4.1 or 4.2 (but then I would not have all these tabular forms).

    If your options seem to be:

  • Using nested tables as suggested by mark, who introduced the downside to Peter about the width of the columns (you can try to remedy using CSS to create fixed-width tables/columns, but my last experience of this receipt very messy in terms of support of IE cross-browser and legacy...)
  • Build the page completely manually without the help of the features integrated in the form of the APEX.
  • Try to customize the behavior of line add to take into account the layout is customized using the dynamics of the actions/jQuery.
  • Do not use the tabular forms.

  • How to take a column of duplicate names and fill a different column with the same names, excluding duplicates?

    How to take a column of duplicate names and fill a different column with the same names, excluding duplicates?

    I find easier to use this copy separate Automator Service (download Dropbox).

    To install in your numbers > Services, double-click menu just the package downloaded .workflow and if necessary give permissions in system preferences > security & privacy.

    To use, just:

    1. Select the cells in the column with duplicate names.
    2. Choose separate copy in numbers > Services menu.
    3. Click once in the upper cell where you want the deduplicated values appear.
    4. Command-v to paste.

    SG

  • SQL to convert a row with 4 columns to 4 rows with 1 column

    Sorry, I know this question has been asked hundreds of times before!

    This is my starting SQL:

    set linesize 500
    
    with tbl_data AS
     (select 'N' argument1, 'Y' argument2, NULL argument3, 'Y' argument4 from dual)
    select * from tbl_data;
    
    
    ARGUMENT1 ARGUMENT2 ARGUMENT3 ARGUMENT4
    --------- --------- --------- ---------
    N         Y                   Y        
    

    Is it possible to enter the data in this format:

                    COL_HEADING
    ARGUMENT1       N
    ARGUMENT2       Y
    ARGUMENT3       
    ARGUMENT4       Y
    

    I have read comments UNPIVOT but can't really work on the syntax to get a single line with 4 columns to appear as 4 rows with 1 column.

    Sorry - I realize that I'm probably be lazy and stupid.

    Any advice much appreciated, thank you.

    Hello

    Here's a way to do it with UNPIVOT:

    SELECT *.

    OF tbl_data

    MUST INCLUDE NULL VALUES

    (col_heading

    FOR column-name IN (argument1

    argument2

    argument3

    argument4

    )

    )

    ;

    Output:

    COLUMN COL_HEADING

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

    ARGUMENT1 N

    ARGUMENT2 Y

    ARGUMENT3

    ARGUMENT4 Y

Maybe you are looking for

  • Computer hp laptop 15 will not pass the logon screen

    I go from 8.1 to 10. Had problems with USB and asked the Microsoft Chat Help. They fixed but my keyboard and wifi would not work. They tried again and after that they have restarted the computer remotely it will not pass the logon screen (time/date).

  • Photosmart 6520e: error code 8004200b on Windows 10 update failure

    I use a laptop Pavilion DV7 64 bit which my Photosmart 6520e is working. I was on Windows 7 but that you have upgraded to Windows 10 in the last 2 months. Updates Windows told me that attempts to install an update to printer ALALA keep failure. The m

  • Router EA2700 cannot be acecssed by the IP after power failure

    I had a power outage, and wireless settings and access the router did not work. How can I reset things if I can't access the router through its IP address. Had a 500-Server error. I am connected by cable to the router via its ports of exit. Thank you

  • Pavilion G4-1311TU - do not install the Bluetooth driver

    Hi all my G4-1311TU Pavilion is having problem with the Bluetooth installation Win7 32-bit driver. In the Device Manager there is a BCM20702A0 Hardware ID: USB\VIB_0A5C & PID_21E3 & REV_0112 Now see the error message «no Bluetooth device waas» detect

  • Passport too enlarged blackBerry and off the screen display

    I don't know what I did, but now when I open my passport, the display is too big, and each time, I have to pinch in the right size.  Even on applications. What I've done and how to get back to hpw I was?