given in the lines, combine them in a single line

Hello world

I have programmed plsql to organize data based on a condition, but I need to do it directly in sql, if possible, once the value of the line in another line to combine in a single line, for example

Header 1 Header 2 Header 3
A77A84A12
A12A10A11
A30A44A42
A77A02A70

A08

A09A86A08

The goal

Header 1 Header 2 Header 3 Header 4 Header 5 Heading 6
A02A10A11A12A77A84
A08A09A86
A30A42

A44

If you can see the line no 2 & 4 there is A12, A77 who do declare on line no 1, so I need to combine and so on.

example of data

CREATE TABLE testrows (col1 VARCHAR2 (10), col2 VARCHAR2 (10), col3 VARCHAR2 (10));

INSERT INTO testrows

VALUES ('77', 'A84', 'A12');

INSERT INTO testrows

VALUES ("A12", "A10", "A11");

INSERT INTO testrows

VALUES ('A30', 'A44', "A42");

INSERT INTO testrows

(col1, col2

)

VALUES ("A08", "A09"

);

INSERT INTO testrows

(col1, col2

)

VALUES ('A86","A08"

);

INSERT INTO testrows

VALUES ('A77","A02","A70");

Kind regards

Hello

I'm not sure that understand what you want.  You must explain in more detail, citing specific examples.

Why won't you 'The A70' in the results?

Maybe you want something like this:

WITH got_r_num AS

(

SELECT col1, col2, col3

ROWNUM AS r_num

OF testrows

)

got_grp AS

(

SELECT the val

MIN (val CONNECT_BY_ROOT) AS grp

-The following 3 lines are necessary only if rotating into discrete columns

-, ROW_NUMBER () OVER (PARTITION OF MIN (val CONNECT_BY_ROOT)

--                               ORDER BY      val

--                             )          AS c_num

OF got_r_num

UNPIVOT (val

FOR the collar (col1, col2, col3)

)

CONNECT BY NOCYCLE (val = val PREREQUISITE AND r_num <> r_num PREREQUISITE)

OR (val <> val PREREQUISITE AND r_num = PRIOR r_num)

GROUP BY val

)

SELECT LISTAGG (val, ",") THE Group (ORDER BY val) AS val_list

OF got_grp

GROUP BY grp

ORDER BY grp

;

The results I get include "The A70" and are in a tall column concatenated, but are also what you asked:

VAL_LIST

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

A02, A10, A11, A12, A70, A77, A84

A08 A09, A86

A30, A42, A44

The number of columns in the output must be hard-coded in the application.  If you want the number of columns depends on what the search query, you need dynamic SQL statements.  The following all the addresses this issue:

Re: 4. How can I convert rows to columns?

Re: County report and the sum of the number of rows by multiple columns

http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:4471013000346257238

Tags: Database

Similar Questions

  • HP Officejet 7610: Scan of the computer cannot be activated or scan and combine them into a single pdf document.

    I've recently updated to macOS Sierra 10.12 and scanning to HP computer software cannot be located when I open the HP utility.

    I can't find a further recommended HP software for my device other than El captain in operating system online.

    If I try to scan through preferences systems for printers and Scanners I can open the scanner, but I can't create a PDF combining into one document - it cancels the procedure after about 2 pages!

    The scan HP Destinations 'PDF for Adobe Reader' is red 'could not locate the target application that might have removed or uninstalled. File format = "PDF".

    How can I get that back?

    Thank you

    Hi @JOGL,

    Thank you for joining the HP Forums!

    I understand that computer analysis can not be activated as well as the scan and combine them into a single pdf document. With your printer HP Officejet 7610. I am pleased to see that for you!

    At this time for this model. There is no software and drivers for Mac OS X 10.12 again, given that the operating system has just been launched, it could take some time. For the time being, you can try to use HP Easy Scan to see if that can meet your scanning preferences. In otherwise, all we can do is wait for the software and drivers to be released.

    If you are unable to reach a resolution, please click on accept solution. If you appreciate my help, please click on the thumbs up icon. The two icons are below this post.

    Thanks for posting and have a nice day!

  • How can I take 2 files saved on Word 3 and combine them into a single file?

    How can I take 2 or 3 files saved on Word 3 and combine them into a single file?

    How can I take 2 or 3 files saved on Word 3 and combine them into a single file?

    Hello

    The easiest way would be to simply copy all the content files and paste them into one of the other files.

    Concerning

  • How to split a video into images and combine them into a single image?

    Little context:

    A game called Roblox let's make you your own games, publish, advertise and monetize them, etc. all this for free. It does not support videos, so I want to make my own using pictures. I have already tested with images individual, but which is laggy. So I thought, what happens if I make an image with a bunch of images in there and have this image to move on the screen it looks like different images.

    So here's what I want as a result (but with my own video and without white space between each image):

    e693b7e58f96e8a696e8a88ae5bdb1e5838f-extract-video-frames.jpg

    How would I achieve that? Is Photoshop the right tool or other necessary software?

    Too bad!

    I use FreeVideoToJPGConverter (software) to convert my videos in jpg files.

    Then, I use Photojoiner.net to convert them into a single image.

  • I have two pdf files. Can I combine them into a single file without analyzing? How?

    I have two separate pdf files.  A file consists of a single page, and the other has two.  Is it possible to combine the two files into a single PDF without sweeping? The analysis does not provide a clear copy.

    Not with just the free reader. Can be done with Acrobat or some of its associated services.

  • Convert different types of files and merges them into a single pdf

    Hello world. I'm a girl from China.

    There is folder containing files of different types, such as doc, msg, jpeg etc. severl.   And I want to convert and merge them into a single pdf according to a certain order. I know that PDFmaker can do well, but the problem is that I have like fodlders 3000 + which requires the same work.

    I want to do with VBA and Acrobat. I have a Standard Version of Acrobat XI and a perfect license, by the way

    And I got the code (thanks, Karl Heinz Kremer) from the merger of two files into a single PDF, but how can I convert them to pdf first?

    Thank you very much.

    If I can finish, I would like to publish my code on this forum.

    You must upgrade to Acrobat Pro. Then, you would be able to use an Action to convert all the files in your file (s) to PDF format and later on another Action (+ script) to combine them into a single PDF file. So basically, it's a 3 step process. Is not ideal, but not too hard, either.

  • Does anyone know how to crop an image in alternating vertical lines (1px apart) and combine them?

    Hey guys! I'm having a hard time to create a custom image for my research project and I was wondering if you guys might lend a hand .

    For my project, I want to take a picture that is 1920 x 1080 and alternating lines of cultures (1 px outside) and then combine them in 960 x 1080 picture.

    Is this possible on Adobe Photoshop? I need to make at least 100 images of this size.

    Thank you!

    I appreciate if you could help me.

    Try this script. He actually chooses a wide band of 2px, but he moves so that they overlap, and you really get a pixel in the final version. There is a bug with PS script than the mess to try to move a layer of a pixel. I'll have to report it. Save the code in a simple text with the extension .jsx below file. Place it in the subfolder of Photoshop Presets\Scripts. Restart Photoshop and it should appear in the main menu > file > Scripts. You can call it as you want. Here's a sample:

    #target photoshop
    
     var doc = activeDocument
     var curLayer = doc.activeLayer
     var odd = 0
     var count = 0
     var sWidth = 0
     var dLayer = false
     var dlg = new Window('dialog','1 PX')
        dlg.even = dlg.add('radiobutton',undefined,'Even');
        dlg.odd = dlg.add('radiobutton',undefined,'Odd');
        dlg.even.value = true;
        dlg.ok = dlg.add('button',undefined,'Ok')
        dlg.ok.onClick = function(){
            if(dlg.even.value){
                odd = count = 0}
            else{odd = 1
                count = -1
                }
            dlg.close()
            makeSel ()
            }
        dlg.show()
    
     function makeSel(){
    
        for (var i = odd;i
    

  • Manipulation of table (delete the lines which are &gt; lines after them)

    I have a table of entry I want to manipulate.

    We measure a rotation device.  In the measurement sequence we want to display the data on a slope that is constantly growing, although when we let off the coast of the acceleration of our mobile device at the end of the test, we end up with a higher torque #s at the beginning of the sequence of RPM... which blurs our line of slope on our chart.

    For example, see the PNG attached on the table of torque/RPM torque.  I need to be able to cut the 2 first lines of the table that we need go less and more general in the line of torque sequence.  Throughout the test, we have a number of line 10 for example couple that is greater than the value of torque on line 11, so that we would need to cut the value of torque in line 10.

    I have attached the vi sub that I plugged in order to try it, but can't make it work.   I don't have to sort the table, but to remove the lines that exceed the lines after them... relatively to the value of rpm decreases constantly.  If I have a pair of value 2340/1869 in the row 1 & 276/1839 in row 2, I need rank 1 deleted.  But if I have a pair of value of 2509/1704 in row 12 & a pair value of 2493/1689 in the 13th row, I don't want to let the value of torque in (if possible) because it is a realistic appearance of the torque curve captured during the sweep of the power of the test.

    Any ideas?

    ready!

  • HP Envy 110 Series printers and I tried several times to reprint documents m in different qualities and align the cartridges, but the lines of words have dragged through them

    I have a HP Envy 110 series printers and I tried several times to reprint documents m in different qualities and align the cartridges, but the lines of words have dragged through them and are not clear. Much of the document is blurry and cut through. Any suggestions?

    Read this article, he describes some steps on how to use the printer utility that came with the printer to run a few steps that might improve the print quality, including cleaning the print cartridge and other procedures.

  • Need help to open two images with the same file with different exposures on the screen at the same time in the Photoshop creative cloud (in previous versions we could open two images of the same nef (raw) file and then combine them on the screen with the

    Need help to open two images with the same file with different exposures on the screen at the same time in the Photoshop creative cloud (in previous versions we could open two images of the same nef (raw) file and then combine them on the screen with the move tool. They have become a composite of two layers which could be developed further with the mask tool.

    Hello

    Please go to the preferences > workspace and uncheck the option 'open the document in the tabs '.

    Now you can click on file and choose file > open and open the two images in two different windows which can be arranged side by side.

    Thank you

  • I have 9, 1 pages in PDF files that are accessible and the need to combine them into 1 PDF file.  I tried adding, adding and the combine process of PDF files. The file created does not take my changes. The file created is partially accessible, but I have

    I have 9, 1 pages in PDF files that are accessible and the need to combine them into 1 PDF file.  I tried adding, adding and the combine process of PDF files. The file created does not take my changes. The file created is partially accessible, but I have to re - the problems that I had fixed in the unique files. I need suggestions on what else can be done, if any. Using Acrobat pro XI.

    By habit, I tend to combine PDF files in the Page pane by right-clicking thumbnails then 'Insert of Pages'-> 'From File'. For me, this preserves the tags of these two documents, although the tags may have to be moved to the correct location (if I remember correctly the tags for inserted pages are put at the end of the tag structure, regardless of where the pages are inserted), if I put the tags in the document to insert into a container as a Section tag It makes the process easier. Travel set of tags in the right place is the only re-fixing that I remember having to do. What behavior you encounter?

    a 'C' student

  • How to keep track of the lines that I add to a table so that I can update more later or remove them?

    A > the form has a set of field and text dropdown list entries.  After the user updates the data in a specific text, change field, I need to add their data to a table on the first time through.   There are many different games of entries that would each have their own line.

    B > later the user comes back and changes the data in a field.  I need to update this specific line with the new values.

    C > later the user returns and removes the data of one of the fields completely so I need to remove that specific table line.

    D > the user does not directly from the table.  The table summarizes the entries that are made in the text and drop-down list fields.  I need to be able to maintain the table in harmony with user input.

    I agree with the addition of rows in a table, but I do not know what's best for that lines are kept synchronized.   I've got a good amount of Java programming experience under my belt, but I have a few projects in LiveCycle.

    I'm quite willng to read if you have any reference material online for the management of dynamic arrays.  So far, the only information I have found is how to add and remove lines, but not how to keep track of them.

    Any help is greatly appreciated.

    Ah sorry missed that you do not use two tables.

    Do you use Extensible lines or is there a specific line for each set of data?

    You can just hardcode where data are intended - a data go into RowA. To the same output of the field, you would be just: table.rowA.rawValue = this.rawValue;

    You can use Global binding on the fields: the fields, take data entry have the same name as the fields in the table and then automatically updated data.

    For blank lines, you will need to check if there is data in the fields and if no data you can hide the line: RowA.presence = 'hidden ';

  • Where to enter the length of the line or measure number if given 16/19 x 32?

    When I enter the number for the length of the line or measure if located in Adobe Caslon Pro 16/19 x 32?  I know that 16 is the size in points, 19 is the head, but where do I enter 32?

    Thank you

    James P

    All this means that you do not enter the 32 directly anywhere. Instead you must do the math to figure out your margins and or gutters between columns to leave the 32 picas, or calculate the inlays for a paragraph style (or the text block) If you need set narrower than the column type.

  • Script to fix the line terminators Chr (13) | CHR (10)

    Hi all

    I try to analyse incoming data to ensure that the line terminators are the used by Windows: Chr (13) | CHR (10). The information is within a CLOB.
    In my tests, I asked the value into a Varchar2 and has done to detect the differences:

    FOR loop_counter in 1... l_len
    Loop
    C_Char: = Substr (S_Value, Loop_Counter, 1);
    Dbms_Output.put_line ('Char' | loop_counter |': ' |) C_Char);
    END LOOP;

    I can see Chr (13) | Chr (10) with this and also make a logic to replace.

    My Question is:
    How do I effectively detect when there's only Chr (13) and then proceed in Chr (13) | CHR (10).
    I intend to put this code on a trigger.

    Thanks in advance.

    Mijail o. T.

    Published by: 914451 on March 20, 2012 06:35

    914451 wrote:
    Given that the filtering is greedy the above model will include the character following the Chr (13) and it will be lost. Already tested that.

    He is lost, because you did not include \1 in your replacement: Chr (13) | Chr (10) | » \1'
    This has nothing to do with greedyness of regular expressions. Gluttony comes in pla when multy tank of wildcards (+ and *) are used. And don't forget: \1 needs () in the model of looking for work!

    Also the opinion it must be more complicated because it must match to replace:
    Chr (13) OR Chr (10) but NOT Chr (13) | CHR (10)

    If you had red a few resources on regular expressions, you should have found the logical or (|).
    The example given with the knowledge that the number in \1 matches the consecutive number of all the braces of opening in the model of all research it should be easy to combine the serch and replace the model you need.

    Good bye
    DPT

  • CFCHART - don't want the lines to go to the ends

    OK, in CFChart, I want to have 2 sets of lines, a rookie who starts to run, and then it turns green and goes to the end.  Here is my code:

    < cfchart format = 'flash' chartheight = '400' chartwidth = '850' showxgridlines = "yes" showygridlines = "yes" >
    < cfchartseries type = 'line' PostesColonne = 'WeekEnding"valuecolumn ="TotalTested"serieslabel ="Actual"seriescolor =" # 0000FF ">
    < cfchartdata value = "1" item = '2009-08-02' >
    < cfchartdata value = '7' item = "2009-08-09" >
    < cfchartdata value '10' = item = "2009-08-17" >
    < / cfchartseries >
    < cfchartseries type = 'line' PostesColonne = 'WeekEnding"valuecolumn ="TotalTested"serieslabel ="Projected"seriescolor ="# 009900">
    < cfchartdata value '10' = item = "2009-08-17" >
    < cfchartdata value = "15" item = "2009-08-23" >
    < / cfchartseries >
    < / cfchart >

    As you can see, I try to get a nice line that switches colors on 17 August. Unfortunately, the blue line (real), he traces a straight line on level 10 to 23. It also draws a green line from the 2nd to the 17th at 10. And it sucks!

    I tried combining them like this:

    < cfchart format = 'flash' chartheight = '400' chartwidth = '850' showxgridlines = "yes" showygridlines = "yes" >
    < cfchartseries type = 'line' PostesColonne = 'WeekEnding"valuecolumn ="TotalTested"serieslabel ="Actual"colorlist =" # 0000FF, 0000FF #, # 0000FF, # 009900 ">
    < cfchartdata value = "1" item = '2009-08-02' >
    < cfchartdata value = '7' item = "2009-08-09" >
    < cfchartdata value '10' = item = "2009-08-17" >
    < cfchartdata value = "15" item = "2009-08-23" >
    < / cfchartseries >
    < / cfchart >

    But who draws the all green. If anyone has a solution, help would be appreciated. Thank you!

    (Repost for archives) Try changing the isInterpolated setting in the XML style, as shown here:

    http://www.cftips.NET/post.cfm/turning-off-interpolated-data-for-cfcharts

    http://www.coldfusionjedi.com/index.cfm/2008/9/17/ask-a-Jedi-handling-nulls-in-a-chart

    
    

    ....

Maybe you are looking for

  • HP mediasmart photo

    My HP MediaSmart Photo software kept freezing and did not close without being forced. When I tried to download an updated version, what I got was a booboo scaled down version where I lost the ability to correct red eye or crop the photo. Any suggesti

  • Black screen after restarting mode "hibernate", green power button is turned on.

    Anyone had a problem in the past to have a black screen? Have had a Sony Vaio VPCF11JFX/B for 2 years now and noticed this problem 3 days ago. Whenever the laptop might restart out of hibernation it would show me only a black screen and light green p

  • Laptop screen + 2 monitors

    I run my T420 on a docking station. Basically, I want to use the laptop screen and two separate screens. Is this possible? I tried, but it doesn't seem to detect one of the screens.

  • 1 box of Cisco Content Management Appliance come Cisco and Cisco WSA RSES.

    Hi all I have a question about Cisco Content Management Appliance, could you please help me check the answer. My client asked me if they could use a box of management to manage devices ASO and ESA. For example, I have 1 box C380 ESA and 1 box WSA S38

  • Connect the printer to the router

    I have a small home network using an ADSL router that has a wireless capability. It would be convenient to be able to connect a printer directly to the router so that any laptop on the network can use it. Is it possible to connect my printer (HP 5100