How to convert a column for lines when characters available with delimiters?

My requirement is to fill a characters that exist between certain special characters.

But if all available NULL, which must also be taken in the same order as being available in the chain.

The sub query returns the values in the following order, but it should display as shown in the result.

Now, it reads as follows:

================

SUB_STR N

1 98

2 78

68 3

4 34

5 90

6

Expected results:

===========

SUB_STR N

1 98

2 78
3

4 68

5 34

6 90

I used the below query, through which I am not able to achieve.

WITH sample_data AS

CHOOSE '98, 78, 68, 34, 90' AS str

   FROM dual

SELECT    LEVEL   AS N

,    REGEXP_SUBSTR ( str )

   , '[^,]+'

   , 1

   , LEVEL

   )   AS sub_str

DE sample_data

CONNECT BY   LEVEL-1   <= regexp_count(str,',')

with qry (STR) as)

Select ' 98, 78, 68, 34, 90' of the double

)

Select the level,

RTrim (regexp_substr (str, ' [^,] *(.| $) ', 1, level), ',') ASPLIT

of qry

connect by level<= length="" (regexp_replace="" (str,="" '[^,]+'))="" +="">

LEVEL ASPLIT
1 '98'
2 "78".
3 null
4 "68".
5 "34".
6 "90."

Tags: Database

Similar Questions

  • How to find my key for microsoft office that came with my laptop?

    How to find my key for microsoft office that came with my laptop?

    Thank you. I guess I'll have to buy a new copy.

  • How to set the content of the column for lines of automatic separation

    Hello guys,.

    I have a problem with the column width and the content of column in a standard report. In the report are hugh entries that are not interrupted by a space character. I put my column width to a special value by usingen "style css: display block; Width: 300px; ». Now the problem is that some of the entries in the column with a longer width that the column width is set. Then they overlock the entries in the column next to them.

    My question is: How to set the column lines of automatic content break after a certain number of characters?

    After searching for a couple of websites and discussion thread, I found maybe a reference to the solution. I hope that it helps you to give me an answer.

    A4 FORMAT LAST_NAME COLUMN
    */*

    concerning

    wderr

    Wderr,

    It is more a matter of HTML as a matter of APEX... You can start by looking here:
    http://www.456bereastreet.com/archive/200704/how_to_prevent_html_tables_from_becoming_too_wide/

    Kind regards
    Dan

    Blog: http://DanielMcGhan.us/
    Work: http://SkillBuilders.com/

  • Since the upgrade to CS6, I see is no longer how to convert files from, for example, a PDF to JPEG and vice versa.  It used to be so simple.  Can anyone help with this?

    Since the upgrade to CS6, I say is no longer how do to convert files from, for example, a PDF file as a JPEG or another type (gif, png, etc.).  When I look at the file in the Finder it simply brings me directly to my original in inDesign document, rather than to appear on the left side of the screen with the save option under sub folder as it did before.  Does anyone know how I can convert the files, I need to do a lot!

    ???? Conversion of files with InDesign? Never have been possible. The only thing you could and can do is to export an InDesign document. You can export to PDF, jpg, etc. just like before.

  • How do validation before inserting a line when press a button insert create?

    Hi all;

    I use JDev 11.1.1.2.0

    How do for validation before inserting a line when press on create a button insert into ADF11g?

    < af:commandButton actionListener = "#{bindings." CreateInsert.execute}.
    Text = "CreateInsert."
    Disabled = "#{!}" bindings. CreateInsert.enabled}.
    ID = "cb8" / >

    best regards;

    Hello
    You can do per set actionlister with commit and action with createinsert
    Good luck
    lixinzhu

  • How to list the columns for a view

    Dear experts

    I know how to list the columns in a table. This easy by querying the data USER_TAB_COLUMNS dictionary.

    But my problem is how to issue a query that returns the columns for a view?

    Thanks in advance

    USER_TAB_COLUMNS stores the metadata for both views.

    Select * from user_tab_columns where table_name = 'YOUR_VIEW_NAME"of order of column_id.    -Replace with your view_name (mandatory course)

    See you soon,.

    Manik.

  • How can I identify the corresponding lines when lead and trolling can be used for several similar values in their?

    I use:

    Oracle SQL Developer (3.0.04) build hand - 04.34 Oracle Database 11 g Enterprise Edition 11.2.0.1.0 - 64 bit Production


    Examples of data

    Table

    with t as)

    Select to_date('8-18-2013','mm-dd-yyyy') dt, "123_' ticket_origin, ticket_destination '123', startid 101, 101 origin, destination 0, 'origin' objecttype, amount 85, 100 area union double all the

    Select to_date('8-18-2013','mm-dd-yyyy'), 123', '123_", 0, 101, 103, 'destination', 85, 100 of all the double union

    Select to_date('8-18-2013','mm-dd-yyyy'), 123', '123_", 103, 0, 0, 'destination', 85, 100 of all the double union

    Select to_date('8-17-2013','mm-dd-yyyy'), 124. _', ' 124. ', 105, 105, 0, 'origin', 150, 200 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 124. _', ' 124. ', 105, 106, 0, 'origin', 150, 200 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '124.', 124. _', 0, 0, 106, 'destination', 150, 300 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '124.', 124. _', 105, 0, 106, 'destination', 150, 300 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127_', '127', 108, 108, 0, 'origin', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127', '127_', 0, 0, 110, 'destination', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127', '127_', 0, 0, 110, 'destination', 75, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 125. ' _', ' 125 '., 108, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 125. ' _', ' 125 '., 108, 112, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', '125', 108, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', '125', 109, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', 125. _', 0, 0, 112, 'destination', 60, 700 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', 125. _', 108, 0, 112, 'destination', 60, 700 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '125', ' 125. ', 0, 0, 109, 'destination', 60, 900 from all the double union

    Select to_date('8-17-2013','mm-dd-yyyy'), '125', ' 125'., 108, 0, 109, 'destination', 60, 900 double

    )

    Is there a way to check date of consolidation for correspondence ticket_origin and ticket_destination when there are two or more lines of difference between them, which does not allow me to use result delay or function. It is also possible do it without using the amount column?

    I also want to identify if they are in the same region, when it is associated with (that I believe works after getting sorted table like so below then use lead lag after having de facto order)

    I'm trying to get something like this table

    with results like)

    Select to_date('8-18-2013','mm-dd-yyyy') dt, "123_' ticket_origin, ticket_destination '123', startid 101, 101 origin, destination 0, 'origin' objecttype, amount 85, 100 area union double all the

    Select to_date('8-18-2013','mm-dd-yyyy'), 123', '123_", 103, 0, 0, 'destination', 85, 100 of all the double union

    Select to_date('8-17-2013','mm-dd-yyyy'), 124. _', ' 124. ', 105, 105, 0, 'origin', 150, 200 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '124.', 124. _', 105, 0, 106, 'destination', 150, 300 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127_', '127', 108, 108, 0, 'origin', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '127', '127_', 0, 0, 110, 'destination', 50, 600 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), 125. ' _', ' 125 '., 108, 108, 0, 'origin', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', 125. _', 0, 0, 112, 'destination', 60, 800 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), ' 125. ', '125', 108, 108, 0, 'origin', 60, 700 Union double all the

    Select to_date('8-17-2013','mm-dd-yyyy'), '125', ' 125. ', 0, 0, 109, 'destination', 60, 900 double

    )

    You need to research rules business more to clarify and apply the mapping one.  The main secret is probably to match the values of ticket.

    Under use a t_view of view with the addition of PK (RID) to the table.  Some discrepancy could be solved by adding more rules for mapping and correcting the expected result entry errors

    SQL > desc t_view

    Name

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

    RID

    DT

    TICKET_ORIGIN

    TICKET_DESTINATION

    STARTID

    ORIGIN

    DESTINATION

    OBJECTTYPE

    AMOUNT

    AREA

    with

    T1 as (select * from t_view where OBJECTTYPE = 'origin'),

    T2 as (select * from t_view where OBJECTTYPE = 'destination').

    map as (t1.rid select origin_id, t2.rid from t1 DESTINATION_id, t2)

    where t1. TICKET_ORIGIN = t2. TICKET_DESTINATION

    and t1. TICKET_DESTINATION = t2. TICKET_ORIGIN

    -Add rules to apply the one-to-one mapping

    and t1.amount = t2.amount

    and t1. STARTID = t1. ORIGIN

    and t2. STARTID = t2. ORIGIN),

    like map2)

    Select origin_id gid, origin_id rid of card

    Union of all the

    Select origin_id gid, DESTINATION_id rid of card)

    Select t_view.* card2, t_view where map2.rid = t_view.rid

    order of map2.gid, map2.rid

    /

       GET RID OF THE DT TICKE TICKE STARTID ORIGIN DESTINATION OBJECTTYPE AMOUNT AREA

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

         1 18 AUGUST 13 123_ 123 101 101 0 origin 85 100
         3 18 AUGUST 13 123 123_ 0 0 destination of 103 85 100
         4 17 AUGUST 13 124. _ 124. 105 105 0 origin 150 200
         6-17 AUGUST 13 124.  124 _ 0 0 destination of 106 150 300
         8 17 AUGUST 13 127_ 127 108 108 0 origin 50 600
         AUGUST 9-17 13 127 127_ 0 0 destination of 110 50 600
        11-17 AUGUST 13 125. _ 125. 108 108 0 origin 60 800
        15-17 AUGUST 13 125.  125 _ 0 0 destination of 112 60 700
        13-17 AUGUST 13 125.  125 108 108 0 origin 60 800
        17 17 AUGUST 13 125 125. 0 0 destination of 109 60 900

    10 selected lines.

  • How to convert the column lines

    I need to convert my output lines of sql for the column as a pivot to 11g

    Please give me the example of this

    check out this link

    http://nimishgarg.blogspot.com/2010/06/Oracle-pivot-data-rows-to-columns.html

    request for 10g would be

    Select *.
    (select job,
    Sum (decode(DEPTNO,10,SAL)) dept10,
    Sum (decode(DEPTNO,20,SAL)) dept20,
    Sum (decode(DEPTNO,30,SAL)) dept30,
    Sum (decode(DEPTNO,40,SAL)) dept40
    from scott.emp
    Working Group)
    order by 1;

  • How to convert the pulse signal line single layer

    Hello

    I tried to create a VI that will allow me to convert a pulse signal (generated by a tachometer) in a line single layer, indicating that a revolution succeeded. I would like to overlay this line on other signals generated.

    I am able to detect the falling edge of the signal, but I could not make a suitable line. I tried to create a new waveform, and juggle the markers, but no method worked for me.

    Does anyone have ideas for a good way to do this?

    Below is my test VI.

    Make the second vertical lines style trace (trace style: no points, no interpolation, fill - inf). a NaN whener you don't want a power cable and a '+ inf' when you want a vertical line.

    Here's a simple example:

  • How can I view the new lines when line is inserted in a VO in Popup

    Hi Experts,

    JDEV version 12.1.3.0

    I have a page jsff where I show the data as below. This table is read-only

    image1.jpg

    If I click on the button create.

    I open a pop-up window. During the initial loading of popup I am inserting a line at the VO. The page main jsff and popup VO are inspired by the same iterator. Screenshot below.

    Untitled.jpg

    But however I note when popup open should see the newly single line.

    But its showing an old recordi, first line of the VO.  How can I avoid showing the old line of the pop-up window. The jsff and the popup are inspired by the same iterator.

    Thank you

    Roy

    Hello

    Requirement is not like that. We must show new lines in the table. Done with the visible property of inputText in the transitional attribute value column on 'Y '.

    On insertion, I put transitional attribute as "O".

  • How to convert the column of ROW using DBMS_REDIFINITION object type column

    Hi all
    Suppose I have the following table to convert:
    create table customer as select customer_id cid, cust_first_name name, cust_address street from customers;
    alter table customer modify cid primary key;
    I created the table based on the customers of the OE schema table, while the street column has cust_address_typ with the following attribute object type
    SQL> describe cust_address_typ
     Name                                     Null?     Type
     ----------------------------------------------------- -------- ------------------------------------
     STREET_ADDRESS                               VARCHAR2(40)
     POSTAL_CODE                                   VARCHAR2(10)
     CITY                                        VARCHAR2(30)
     STATE_PROVINCE                               VARCHAR2(10)
     COUNTRY_ID                                   CHAR(2)
    I want to convert the object attribute adresse_rue in a column of RDM. Consider the following temporary table:
    CREATE TABLE INT_CUSTOMER(
    CID NUMBER,
    NAME VARCHAR2(30),
    street varchar2(100)
    );
    First of all, I checked if the table can be redefined:
    --Verify if the table can be redefined
    BEGIN
    DBMS_REDEFINITION.CAN_REDEF_TABLE('OE','CUSTOMER',DBMS_REDEFINITION.CONS_USE_PK);
    END;
     4  /
    
    PL/SQL procedure successfully completed.
    But when I started the redefinition, I got an error:
    BEGIN
    DBMS_REDEFINITION.START_REDEF_TABLE(
    uname => 'OE',
    orig_table => 'CUSTOMER',
    int_table => 'INT_CUSTOMER',
    col_mapping => 'CID CID, NAME NAME, STREET CUST_ADDRESS_TYP(STREET_ADDRESS)'
    );
    END;
      9  /
    BEGIN
    *
    ERROR at line 1:
    ORA-00923: FROM keyword not found where expected
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 52
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1646
    ORA-06512: at line 2
    What seemed to be the problem?

    Best regards
    Val

    Published by: Valerie good-natured October 9, 2011 21:43

    Have you tried this one:

    BEGIN
    DBMS_REDEFINITION.START_REDEF_TABLE(
    uname => 'OE',
    orig_table => 'CUSTOMER',
    int_table => 'INT_CUSTOMER',
    col_mapping => 'CID CID, NAME NAME,"CUSTOMER".STREET.STREET_ADDRESS STREET'
    );
    END;
    

    Looking at your trace file, I claim that when you use the call above to START_REDEF_TABLE, the inner workings of this procedure will create this SQL statement:

    select CID CID, NAME NAME,"CUSTOMER".STREET.STREET_ADDRESS STREET from "OE"."CUSTOMER" "CUSTOMER"
    

    (You can prove or disprove my claim by tracing it ;-)))

    And this statement has had an alias - even if the alias is the same as the name of the table...

  • How to format a column number displayed when drilled down in the dimension

    I have a question:

    For example, I defined a drill on track: year/month/day. I then create a report with the first column in the year. When a user clicks on the column of the year, he bore down to display the year, month, etc. So far so good.

    Say that the month is a number of type double: 1 for January, 2 for the Fed, etc.

    Now, the displayed month is 1,00, 2,00, etc.. Same question when uncovered. The chart legend / label this issue also.

    I can format the year for not only no decimals in tab Format of data when the report is created. Question: How can I format the month? I don't have a chance to make the change in Data Format because it is a column displayed automatically through zoom.

    I could format the month in Business Admin tool or the presentation layer. But I'm looking for solutions BI answers / dashboard.

    Thanks in advance for your help.

    You can set a default value to the system-wide formatting for this column. Add the column to a request format her if necessary, and then in the tab press 'Format of column', 'Save'-> "default" systems for 'Time'. Month' "(or whatever your column is called).

    Just be aware that it will be applicable throughout the entire catalog!

    See you soon,.
    C.

  • How to use multiple columns for the bookmarks instead of column 1

    Bookmarks always appear in a single column. As I have a lot you have to scroll to see all.

    How can I set bookmarks in several columns so that I can see them all at the same time.

    You can use the above. The Bookmark Manager works just like the
    folders on your computer. Create folders by using the sort and general name
    your list in these files. In addition, when you open the Manager, it
    a search box is at the top right.

  • How to solve the dark median line when I use officejet all-in-one, the copy function?

    The print function is good, but has only problem in copy functioln.  How to clear the dark midline?

    Hello tseng0719,

    I think it would be useful to have more information in this case. For example:

    What printer do you have? This happens when you copy of the bucket or the adf? Do this also happen when you scan a picture?

    A small tip would be to clean the glass of the scanner because it migh be fine it's only down to the dirt on the glass (especially if this happens when you scan using the adf).

  • How to prepare the PDF for printer when you print spreads with bleeding

    I have created a 12 - page document that is willing to go to printer. The front and rear cover a bleed on it and not too sure how to prepare the file.

    I sent unique pages with printer in the past harvest files so they can print as a booklet on their end, but this one is a little tricky because of the purge. I have been able to manually create a file of InD 11 x 17 and throw out and export that in PDF with crop marks, but something tells me that this is not the best way.

    For this work, I send you the original InD file so the printer can do everything they need to do to make things, but I would like to know for future reference.

    Thank you in advance!

    A 12-page document would print on 3 sheets of paper, so inside purge (on the back) probably won't be a problem, so you can set it to 0, or let the same thing that the bleed on the outer edges and let the tax to the printer software ignore it (assuming you let the printer do its work to impose). Send a PDF of 12 pages (with bleed) in consecutive order would be normal childbirth.

    But still, when you have a question like this, you should call and ask what they want to the printer.

Maybe you are looking for

  • HP Compaq Elite 8000 small: what type of cable should I use for dell dual monitors hp compaq 8000 elite?

    I'm not very tech savy when it comes to computers. I'm trying to understand what kind of cable I need to buy to allow both of my Dell, monitors to connect to the back of my Tower. I have only 1 connection vga at the back of the tower.

  • Update the Firmware on HP printers

    A printer firmware is the internal software that controls the operation of the device.  Whenever you want to solve a problem with a printer, it is always best to make sure that the firmware is up to date. Occasionally, companies will release a firmwa

  • do not pull on my EOS 70 d

    My EOS 70 D won't all take pictures. When I take a picture, it will act as it concentrates in flashing and others, but he won't never through. He always busy. I tried all modes, and none does not work even without flash. I also pulled the battery out

  • Cannot install the home network.

    I am running windows xp sp3 on a processor intel based Macbook. Networks domestic to work properly but stopped. I have reinstalled on 4 computers. 3 IBM based PC very well working but does not work on Macbook. Wireless network adapter works fine on t

  • The appeal of recovery

    How can I create restore on a Pavilion hp8-1210 discs or how to invoke recovery when starting?