A (string) row in column split

Hello

I came across a need where I split a string, 3 each in the tank columns and should be done only through SQL.

I am newbie to POSIX.

Ex the input string is "ABCDEFGHI".

Output expected

COL1 COL2

ABC ABCDEFGHI

DEF ABCDEFGHI

GHI ABCDEFGHI

Any help would be appreciated.

SQL > with t as (select "abcdefghijkl" double union str

2. Select "pqrstu' double Union

3. Select 'wxyz' double

4            )

5 - the actual query:

6 select *.

(select col1 str 7

8, substr (str, level * 3-2, 3) col2

9 t

10 connect by str = str prior

11 and prior dbms_random.value is not null

12 and level<= (="" select="">

13                               from   t

14                             )

15       )

16 when col2 is not null

17.

COL1 COL

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

abcdefghijkl abc

abcdefghijkl def

abcdefghijkl IGS

abcdefghijkl jkl

pqrstu pqr

pqrstu stu

WXY WXYZ

WXYZ z

8 selected lines.

Tags: Database

Similar Questions

  • How to get the string (specified by row and column) of txt file with labview

    Hello world

    How to get the string (specified by row and column) of txt file with labview

    THX

    As far as I know, a text file has no column.  Be more specific.  Do you mean something like the 5th word on line 4, where the words are separated by a space, and lines are separated by a newline character?  You can read from the spreadsheet String function and set the delimiter to a space.  This will produce a 2D channels table.  Then use the table to index and give the line number and column number.

  • concatenate the strings from a column into a single row?

    How to concatenate strings from a column into a single line?

    Color
    ------
    Red
    Orange
    Blue
    Green

    And return a set of results as follows:

    Colors
    -------------------------
    Red, orange, blue, green

    Various ways can be found here:
    http://www.Oracle-base.com/articles/10G/StringAggregationTechniques.php

  • Rows and columns help

    Previously on AI9 when I wanted to change a matrix that I created using rows and columns, I select the cells in the matrix and then click rows and columns.  Now I have CS4 and the documentation says that I should be able to do the same thing using the Options of the Type of area.  However, when I select the cells of a matrix that I created in AI9, Options of Type box is ghost out.  How to change this matrix?

    I would copy and paste in front before I try this.

    Then select the text which is place the text cursor in the text frame, you want to split or select it with the selection tool.

    then see if the Type > text box Options are available. They should be.

    If this isn't the case, it means they aren't object path text box.

    Click on the image with the tool text box to make a block of text in box now the options should be available.

    The way to know if these are paths of purpose is to select one and go to object > path > split into grid and if it's available, then it is an object path.

    The text engine and this feature was changed to AI CS1 and this is probably the cause of the translation to be a little messed up.

  • How to change the rows and columns of newtabs?

    I can't change the rows and columns to mozilla version 33

    From topic: config browser.newtabpage.columns shows 5 by default, but these 5 columns appear not only 3 as before. Don't know why, but I use generally not even the default new tab page in my profile daily.

    Still works this - https://addons.mozilla.org/en-US/firefox/addon/new-tab-tools/ - extension to change the page of newTab via a user accessible interface name in the Addons, rather than routing autour Manager inside Firefox. I use this add-on in a second profile that I use for my favorite sites

  • How can I insert a number to a specific index (row and column) to a table

    I had the most with function 'insert into array' problem because of its counter-intuitiveness. I want to insert a number I got inside a loop IN a table. The ROW and COLUMN of this table I want enter the number is specified by the number of loops of two loops FOR. It did not work.

    So, I have isolated and tested this function further. Frankly, I initialized a table 2D with ZEROS and plugged into the "insert into array" function (on top of entry). I then put the number '1' for the index (line) and the number "2" for the index (column) and then put the entry number "6" for the "new item/sub-table. Then, I hung a picture of 2-D (indicator) output to the output of the function "insert into array. When I did all that, it means I want to just put the number '6' in line '1' and the column '2'... This isn't letting me do it.

    How can I do this SIMPLE?

    Hi Darrell h...,

    Looks like you can use the function "autoindexing. Take your value and connect it to your loop, it will be a default autoindexing. Right-click on the last tunnel of output and select Create indicator, the result is your table.

    It will be useful.

    Mike

  • Obtaining of row and column of a table element

    Hello

    I have a table of 24 rows and column 24 giving me a total of 576 items. How can I get the row and column of a particular element in a table in LabView. For example if I write to item 127 How can I get the column and line item 127 is located.

    Kind regards

    Bastien

    Hi Marion,.

    Maybe just need to find the right "address" element in your 2D table?

    Use something like this:

    Maybe you have to out of line & column according to your numbering scheme...

  • Write multiple rows and columns of the worksheet

    Is it possible to write several rows and columns of the spreadsheet, with the ability to add data to the file and create a new file if it does not exist?
    I tried to write to table vi, but I couldn't make it work.
    It won't let me write several lines in the same column.
    Can someone please give me an example?
    Thanks in advance.

    If you want to use the tab character (\t) as the delimiter, then check the txt file.  Then Excel will open as you wish.

    If you want to keep the csv extension, then use comma (,) as a separator.

  • config file error could not open the file line column 0 0 onfig file error cannot open file row 0 column 0 - whenever I try to open my hp game console

    original title: config file error could not open the file column line 0 0

    onfig file error cannot open file row 0 column 0 - whenever I try to open my hp game console... I get this error message...

    Hello

    Was the HP works well before game console? If Yes, then do you remember any hardware/software changes, after which the problem started?

    Method 1: I would say you put the computer to boot and then check if the problem is caused by any third-party application.

    http://support.Microsoft.com/kb/929135

    Note: After troubleshooting, be sure to set the computer to start as usual as mentioned in step 7 in the above article.

    Method 2: I would say as you uninstall and reinstall the HP game console and check to see if it helps:

    Uninstall or change a program

    http://Windows.Microsoft.com/en-us/Windows-Vista/uninstall-or-change-a-program

    You can also try posting your question in the HP Support forums.

    HP Support Forums - operating systems and software

    http://h30434.www3.HP.com/T5/desktop-operating-systems-and/BD-p/OSandSW

  • Rows of columns

    Hello

    I have a query of the following type:

    SELECT ID, COLUMN_LABEL, VALUE OF METRICS

    For each ID, there is a label and a value:

    1 TEST OF 100

    1 DAY 17/07/2015

    1. sign /tmp/log.txt

    TEST2 2 100

    2 DAY 16/07/2014

    2 LOG /tmp/log_2.txt

    How can I ensure, for each get KEY_ID n VALUES in the form of columns of a row with the position of the columns as COLUMN_LABEL? It looks like this

    KEY_ID TEST DATE LOG

    1 100 /tmp/log.txt 17/07/2014

    2 100 tmp_log2.txt 16/07/2014

    Thanks for your help

    Hello

    This is called swivel.  The forum FAQ has a page dedicated to it.  See: Re: 4. How can I convert rows to columns?

    If you get stuck, post your best attempt, with CREATE TABLE and INSERT statements for your sample data and accurate results, you want to start from these data (otherwise what you have already posted).  See: Re: 2. How can I ask a question on the forums?

  • get the length of each string in a column

    Hi all

    Is there a way to get the length of each string in a column:

    for example:

    If the table contains lines like below:

    Select 'test test1 test31' col1 of double

    Union of all the

    Select 'sectest1 sectest234' double col1

    The output should be as below:

    col1

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

    4 5 6

    8 10

    That is to say get the count of each separated from the chain of space in a column. Is this possible using regexpr_substr?

    Thanks in advance.

    Roy.

    Try the below

    SELECT LISTAGG(val1,' ') IN ONE GROUP)

    New_val ORDER BY lvl)

    Of

    (SELECT LENGTH (REGEXP_SUBSTR (col1,'[^] +', 1, LEVEL)) val1,)

    RN,

    LEVEL lvl

    Of

    (SELECT col1,

    ROWNUM rn

    Of

    (SELECT 'test test1 test31' col1 OF double)

    UNION ALL

    SELECT 'sectest1 sectest234' double col1

    )

    )

    CONNECT BY LEVEL<= regexp_count(col1,'="">

    AND PRIOR rn = rn

    AND PRIOR DBMS_RANDOM. VALUE IS NOT NULL

    )

    GROUP BY rn;

    OUTPUT:-

    =======

    col1

    ----

    4 5 6

    8 10

    Thank you

    Ann

  • How to copy/paste in rows and columns

    Let's say I have an object in PS (gummy bear for example) and I want to duplicate in rows and columns. Is there a way to do it automatically?

    1. open your file of gummy bear and resize the image to a smaller, if necessary.

    2 file > set the model. Name it and ok.

    3. open a new file, 8 x 10, for example

    4 edit > fill > model... and in the Custom model drop-down list, it will be the last of them. Choose it.

    5. click on OK

    Fact.

    If your want a space between gummy bear, add space in step 1

    Good luck

  • Insert only one cell in a table (not an extra set of the row or column)?

    I have problems by performing an easy Assembly. I need to insert a a 'CELL', but I am only considered the possibility to insert a set 'ROW' or 'COLUMN '. I would just insert a cell and the rest of the content below it moves accordingly. Help, please!

    There is no way to put it while you just insert a cell and everything moves along after that cell?

    Simple answer is 'no '. I'm sorry.

    InDesign tables are not good for juggling data. If you have a project that requires single-cell-integration on a regular basis, I suggest to make your table outside InDesign in an application with tools more easy table-cell-juggling (Excel comes to mind here) and then perfecting you use table and cell styles make it easy to update. Of course, it will always be a concern, but the hassle can be minimized.

  • Sortable rows and columns

    Is it possible to drag and drop the rows and columns of a multicolumn script to rearrange them. If this isn't the case, it would be appropriate.

    Please write to us.

    We do not expect to support mobile in an AV Scripts columns because they are only 2 columns fixed in script format.

    If you create a script to multiple columns and click on a column heading, you will end up by selecting the contents of that column. Press CTRL-X to cut this column, then press CTRLV to paste the column somewhere before an existing column.

    This should solve your problem.

    -Anubhav

    Anubhav Rohatgi

    Senior product manager

  • Max rows and columns

    What can be the maximum number of rows and columns, you can have in a table in an oracle database?

    See the limits of logical database in http://download.oracle.com/docs/cd/E11882_01/server.112/e17110/limits003.htm#i288032.

Maybe you are looking for

  • Has no updated BIOS on the Satellite X 200

    I tried to update the BIOS on my laptop when the whole system froze for a few minutes and then all the programs that the update has been closed. I tried to restart the phone after about 30 minutes, and then he froze the newspaper off the screen. The

  • My ipod touch does not illuminate, but siri works and turn on randomly.

    I was using my ipod and then it froze from nowhere. So, I turn it off using the power button. But, siri was turning, and saying: "I don't have that." Although I do not have suumon him. And now my ipod turns on.

  • How to disassemble the Camileo S10?

    I would like to hack the S10 to solve 2 problems: (1) put an adapter wide angleIn fact, it is almost impossible, but to remove the plastic part in front of the goal allows access to the cylindrical part of it and to set an adapter wide angle (2) I ne

  • Or-Scope on Linux

    As the information provided by ni.com looking a little outdated, I would like to know the current state of the nor-Scope drivers on linux. Specifically, I need to know if: (1) I use the GHz sampling rate digitizers (nor 5154 / 5153 / 5152) with no-sc

  • Getting 8.5.4 firmware for autonomous SIP Phone

    I have set up a 7962 as a standalone SIP phone to connect with the world. I downloaded 9.4 and it seems to obey me ok. But after starting, he spends a lot of time "Registration", then says "your current options. However, it has not registered. The er