How to divide a single line (all lines) for the use of a few sql

I have table

Select * from une_table;

name_a
date_a
name_b

Date_B

Sunday01.01.2015Monday02.01.2015
Tuesday03.01.2015Wednesday04.01.2015

How to divide this table in all lines after using sql:

name
Date
Sunday01.01.2015
Monday02.01.2015
Tuesday03.01.2015
Wednesday04.01.2015

Thanks for the replies.

Trajon,

You don't have a table. You have a store of garbage. There is a repeating group in your 'table' and column name_a etc is unnecessary, because you can derive the day of the week from your date by a to_char function.

You can find it in your documentation online.

Knowing that you can get the ordinal number of a date using to_char, what have you tried to do it yourself?

Your answer is probably: NOTHING.

First try to solve it yourself and if you post something here, make sure that this forum is not to throw up, because your code that is terribly bad.

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

Sybrand Bakker

Senior Oracle DBA

Tags: Database

Similar Questions

  • How to publish a single page of Muse for the site which also has a Wordpress site

    I have a site (ddmdigital.com) that has Wordpress on it. I need to create multiple independent, autonomous Muse pages that I join this site... not to be accessible since the Wordpress site, which is only accessed from the site itself. For example, I want to put the files in a folder called FB url would be ddmdigital.com/fb/pagename. I can't understand how to specify in the "FTP to the Url" dialog of Muse I want to download them. I created the folder called FB and tried to use it but Muse just says no: "found no record of the same name."

    I did it by FTP - ing manually all the files, but I would use Muse publish feature. Any help?

    Thank you!

    Screenshot of ftp window will help you. Alternatively, you can export the HTML pages and then upload to your server using any FTP client.

    Thank you

    Sanjit

  • Graphics problems with a single line at the top.

    During bootup until I perfect video resolution, but after starting windows I have a single line of the video of the ideas would be useful. I already checked the wiring, video card and the BIOS settings. Anyone had this problem? This had beat me my head against the wall for a week now.

    I'm just guessing that you have a problem with
    your video driver. Maybe the info will be
    be useful...

    Good luck...

    What happens if you start in Mode safe?

    (315222) a Description of the Safe Mode
    Boot into Windows XP options
    http://support.Microsoft.com/?kbid=315222

    How to start safe mode in Windows XP
    http://bertk.MVPs.org/html/SafeMode.html

    If you start correctly in safe mode... it can
    be worth a try to roll back your video driver.

    (306546) HOW to: use the driver to restore roll back feature
    a previous Version of a device in Windows XP driver
    http://support.Microsoft.com/default.aspx?scid=kb;en-us;306546

  • How can I get the lines for the date between 2 different days

    Hi all,

    How can I get the lines for the date between 2 different days.

    Sample data:
    Table name: Articles
    Title start_date end_date
    Heading1 08-22-2011 2011-09-11
    2011-08-01-2011-09-01 Title2
    Title 3 2011-08-21 08-21-2011
    title4 2011-08-28 2011-09-11

    Result will be:
    Title start_date end_date
    Heading1 08-22-2011 2011-09-11
    2011-08-01-2011-09-01 Title2
    title4 2011-08-28 2011-09-11

    This is my example query:
    SELECT * FROM items WHERE trunc (es.date_start) > = TO_DATE('2011-08-22', 'YYYY-MM-DD') AND trunc (es.date_end) < = TO_DATE ('2011-08-28', 'YYYY-MM-DD')

    but I can not get the expected results. Any help would be much appreciated.

    Thanks in advance

    not read your question properly before...

    Please try this

    Select * FROM items
    WHERE (TO_DATE ('2011-08-22', 'YYYY-MM-DD') between TRUNC (es.date_start))
    AND TRUNC (es.date_end)) OR
    (TO_DATE ('2011-08-28', 'YYYY-MM-DD') between TRUNC (es.date_start))
    AND TRUNC (es.date_end))

  • How can I draw a line around the edge of a piece of property that I shot a video clip of 13 elements?

    How can I draw a line around the edge of a piece of real estate in a video clip with 13 elements?

    KING OF THE SKY

    First 13 items on what operating system? Have you updated 13 to 13.1 still using Help Menu/updates to date of an open project?

    Your question immediately... you could try something like this

    In this scenario, you start with your video on video 1 track with the Timeline indicator placed in the appropriate location of content timeline.

    The Titler line file created will be automatically placed at the position of the indicator in the timeline.

    Text Menu/New/default of titration / and select the Section forms.

    The Titler file goes to Video Track 2 above the video on the video 1 track.

    Select the line tool in the section shapes and draw your line on screen correspond to the where you want it to appear in the video below.

    Your image of the line is the line on transparent background where the content below shows through the transparent areas in this image of the line.

    Please consider. If any questions or need any clarification on the above, do not hesitate to ask.

    Thank you.

    RTA

  • How to determine a specific line in the table clicked on

    Hello-

    I need to determine the specific line of a table control that is right-mouse-clicking.  I think that this is possible by using the context Menu Activation? event for the control of the table and get the vertical coordinate in the Coords filter options.

    He is performing experiments to determine the vertical amplitude of each row in the table, or maybe in determining the width of a line and using a linear relationship to determine the possible range of the following lines.  Do you feel it is the best strategy or is it maybe an another easier way to get this information?

    Thank you

    Don

    You can use the CtlRef with the Point in the array to the method line for the information.

    Ben64

    I was too slow to respond...

  • file navigation links to 2 lines for the size of the phone

    Hi everyone, Happy Thursday (or brain dead Thursday for me)!

    I'm working on a new project "sensitive."  As a new project, I am starting with the smallest width and work my way up.

    I have a simple navigation at the top of the page with links to "roll-over" six texts.

    On the smaller size (smart phone - 320px), I need to "Pack" 2-line text links, then a line for each of the large sizes.  I also need to move a chart which is directly below the links down to account for the additional line, and then back up again when the size of the window changes.  For some reason, I can't understand how to do this.  In addition, the navigation will be added to an existing HTML page when finished.

    My question is:

    How can I tell Edge to move the NAV of two lines of text on a single line (and move the chart) when I hit a specific window size (application)?

    I have questions for the media established in the CSS for the HTML part of the page.  Could I simply "show/hide" a div in particular, one with two lines for the nav and the other with a single line using CSS, or is there a better way?

    If it is possible to do so at the idea of div "show/hide", it would be better (or even possible) to make animations of different navigation for each media queries (if necessary)?

    Sorry for my temporary (I hope!) "brain dead" condition :-)

    James

    Hi, James.

    You could go about it like that, but I wanted to point you to EdgeCommons (http://www.edgecommons.org), maintained by Simon Widjaja.  It has a great video that explains how it works:

    DGE-animate-and-the-edge-Commons-Library/ http://TV.adobe.com/watch/Create-Like-Crazy-with-Adobe-Edge/flexible-layouts-using-Adobe-e

    Hope this is useful!

    -Elaine

  • Identify the missing lines for the hierarchy

    Oracle 10.2.0.1
    Windows XP

    create table vill (identification number (5), area varchar2 (20), subarea1 varchar2 (20), subarea2 varchar2 (20), location varchar2 (20));
    Insert in the vill values(1,'AREA1','SUBAREA1','SUBAREA2','AREA1');
    Insert in the vill values(2,'AREA1','SUBAREA1','SUBAREA2','SUBAREA1');
    Insert in the vill values(3,'AREA1','SUBAREA1','SUBAREA2','SUBAREA2');
    Insert in the vill values(4,'AREA1','SUBAREA1','SUBAREA2','VILL1');
    Insert in the vill values(5,'AREA1','SUBAREA1','SUBAREA2','VILL2');
    Insert in the vill values(6,'AREA1','SUBAREA1','SUBAREA2','VILL3');
    Insert in the vill values(7,'AREA1','SUBAREA1','SUBAREA2','VILL4');
    -Before is a perfect set of lines because it has all the lines in the area, subarea1 and subarea2.
    Insert in the vill values(8,'AREA2','SUBAREA1','SUBAREA2','AREA2');
    Insert in the vill values(9,'AREA2','SUBAREA1','SUBAREA2','SUBAREA1');
    Insert in the vill values(10,'AREA2','SUBAREA1','SUBAREA2','VILL5');
    Insert in the vill values(11,'AREA2','SUBAREA1','SUBAREA2','VILL6');
    Insert in the vill values(12,'AREA2','SUBAREA1','SUBAREA2','VILL7');
    Insert in the vill values(13,'AREA2','SUBAREA1','SUBAREA2','VILL8');

    Insert in the vill values(14,'AREA3','SUBAREA1','SUBAREA2','AREA3');
    Insert in the vill values(15,'AREA3','SUBAREA1','SUBAREA2','SUBAREA2');
    Insert in the vill values(16,'AREA3','SUBAREA1','SUBAREA2','VILL9');
    Insert in the vill values(17,'AREA3','SUBAREA1','SUBAREA2','VILL10');
    Insert in the vill values(18,'AREA3','SUBAREA1','SUBAREA2','VILL11');
    Insert in the vill values(19,'AREA3','SUBAREA1','SUBAREA2','VILL12');

    Insert in the vill values(20,'AREA4','SUBAREA1','SUBAREA2','SUBAREA1');
    Insert in the vill values(21,'AREA4','SUBAREA1','SUBAREA2','SUBAREA2');
    Insert in the vill values(22,'AREA4','SUBAREA1','SUBAREA2','VILL13');
    Insert in the vill values(23,'AREA4','SUBAREA1','SUBAREA2','VILL14');
    Insert in the vill values(24,'AREA4','SUBAREA1','SUBAREA2','VILL15');
    Insert in the vill values(25,'AREA4','SUBAREA1','SUBAREA2','VILL16');
    commit;
    Select * from city;
            ID AREA                 SUBAREA1             SUBAREA2             LOCATION
    ---------- -------------------- -------------------- -------------------- --------------------
             1 AREA1                SUBAREA1             SUBAREA2             AREA1
             2 AREA1                SUBAREA1             SUBAREA2             SUBAREA1
             3 AREA1                SUBAREA1             SUBAREA2             SUBAREA2
             4 AREA1                SUBAREA1             SUBAREA2             VILL1
             5 AREA1                SUBAREA1             SUBAREA2             VILL2
             6 AREA1                SUBAREA1             SUBAREA2             VILL3
             7 AREA1                SUBAREA1             SUBAREA2             VILL4
             8 AREA2                SUBAREA1             SUBAREA2             AREA2
             9 AREA2                SUBAREA1             SUBAREA2             SUBAREA1
            10 AREA2                SUBAREA1             SUBAREA2             VILL5
            11 AREA2                SUBAREA1             SUBAREA2             VILL6
            12 AREA2                SUBAREA1             SUBAREA2             VILL7
            13 AREA2                SUBAREA1             SUBAREA2             VILL8
            14 AREA3                SUBAREA1             SUBAREA2             AREA3
            15 AREA3                SUBAREA1             SUBAREA2             SUBAREA2
            16 AREA3                SUBAREA1             SUBAREA2             VILL9
            17 AREA3                SUBAREA1             SUBAREA2             VILL10
            18 AREA3                SUBAREA1             SUBAREA2             VILL11
            19 AREA3                SUBAREA1             SUBAREA2             VILL12
            20 AREA4                SUBAREA1             SUBAREA2             SUBAREA1
            21 AREA4                SUBAREA1             SUBAREA2             SUBAREA2
            22 AREA4                SUBAREA1             SUBAREA2             VILL13
            23 AREA4                SUBAREA1             SUBAREA2             VILL14
            24 AREA4                SUBAREA1             SUBAREA2             VILL15
            25 AREA4                SUBAREA1             SUBAREA2             VILL16
    
    25 rows selected.
    Power required:
            ID AREA                 SUBAREA1             SUBAREA2             LOCATION
    ---------- -------------------- -------------------- -------------------- --------------------
            26 AREA2                SUBAREA1             SUBAREA2             SUBAREA2
            27 AREA3                SUBAREA1             SUBAREA2             SUBAREA1
            28 AREA4                SUBAREA1             SUBAREA2             AREA4
    Why?

    Because as I said above that rowset for the euro1 area is perfect because in the location column there are lines for the euro1, SUBAREA1 and SUBAREA2 area. is exists, whereas if we see that there are no lines for AREA2 with the value SUBAREA2 in the place, even regarding the Domain3, there is no line that has the value of the SUBAREA1 location and even for AREA4, there is no line as location = AREA4. It is a table which is having all the names of place with nested values; for example, we can see that vill7 is exist in zone2 including SUBAREA1 (COLUMN NAME) = "SUBAREA1" AND SUBAREA2 (COLUMN NAME) = "SUBAREA2", but I would like to know location = SUBAREA2 then it will say no line, I want to generate all the lines that is to have no value in the column location for said AREA/SUBAREA1/SUBAREA2 column. Table is sorted by ID. Total column lines are 45800.
    SQL> select * from vill where area='AREA1' and location='SUBAREA1';
    
            ID AREA                 SUBAREA1             SUBAREA2             LOCATION
    ---------- -------------------- -------------------- -------------------- --------------------
             2 AREA1                SUBAREA1             SUBAREA2             SUBAREA1
    Ok
    SQL> select * from vill where area='AREA2' and location='SUBAREA1';
    
            ID AREA                 SUBAREA1             SUBAREA2             LOCATION
    ---------- -------------------- -------------------- -------------------- --------------------
             9 AREA2                SUBAREA1             SUBAREA2             SUBAREA1
    It is also ok, but if said
    SQL> select * from vill where area='AREA2' and location='SUBAREA2';
    
    no rows selected 
    < <-Yes, this line I want to generate, because there should be a line whose location = "SBUAREA2" but why? Because otherwise how do I know what is the hierarchy of the SUBAREA2; While vill 5,6,7 and 8 were SUBAREA2 as "SUBAREA2".

    I'm not sure how I am clear in my question, please let me know if I need to provide more details.

    Thank you.

    user12050217 wrote:
    ... query should return:

    ID AREA                 SUBAREA1             SUBAREA2             LOCATION
    ---------- -------------------- -------------------- -------------------- --------------------
    131 my state             my city              my city              street 2
    

    Sorry, I don't understand that one line. Was it a mistake? I think I understand all the other lines that you want to, but I do not understand why you want the one above. Did you mean

    ID AREA                 SUBAREA1             SUBAREA2             LOCATION
    ---------- -------------------- -------------------- -------------------- --------------------
    131 my state             my city              street 2             street 2
    

    ?

    If this is not the case, why you don't want the row immediately above? Why don't you also:

    `       ID AREA                 SUBAREA1             SUBAREA2             LOCATION
    ---------- -------------------- -------------------- -------------------- --------------------
           131 my state             new city             new city             street 2
    

    ?

    Assuming it was just a mistake, the following Gets the results you want

    WITH     rows_needed     AS
    (
         SELECT     area
         ,     area          AS subarea1
         ,     area          AS subarea2
         ,     area          AS location
         FROM     vill
         WHERE     area           != subarea1
         OR     area          != subarea2
         OR     area          != location
        UNION
         SELECT     area
         ,     subarea1
         ,     subarea1     AS subarea2
         ,     subarea1     AS location
         FROM     vill
         WHERE     subarea1     != subarea2
         OR     subarea1     != location
        UNION
         SELECT     area
         ,     subarea1
         ,     subarea2
         ,     subarea2     AS location
         FROM     vill
    )
    SELECT     (
              SELECT     MAX (id)
              FROM     vill
         ) + ROWNUM          AS id
    ,     area, subarea1, subarea2, location
    FROM     rows_needed
    WHERE     (area, subarea1, subarea2, location)
               NOT IN (
                       SELECT  area, subarea1, subarea2, location
                       FROM    vill
                     )
    ;
    

    except that it is for an indefinite period including the ID will assign to what line. I guess that doesn't matter, as long as 130 to 137 numbers are used (or 131 to 138, if that is what you really want).

    When I run your code on the table he returned me the desired output, but when I run it on my actual table that is having 45800 lines, then he messed up some results, because I think that in your code, I should mention the clause ORDER BY ID somewhere... Therefore, in this example I mention different IDS while inserting the lines. Your code worked very well because it is having only 25 rows with ID Ordered, while my actual table is to have 45800 lines in the table, there is no guarantee of ID ordered... so I think that its a problem with the order by clause, ID... but I don't know where I should put this clause

    What is the significance of id? Is this just a unique key? That's, I guess that each line must have an id and two rows can have the same id, but, aside from that, it doesn't matter what line has which id.
    The query I posted yesterday assumes that subarea1 and subarea2 were functionally dependent on the area. as in the example of data you posted yesterday. I see your last post that's not true, and which explains erroneous results.

    As I said yesterday, if you are actually setting up new lines in the table, you must use a sequence to generate identifiers.

  • How to stop a Web site generating spams are sent to me - it is all associated with the use of viagra and I had 10 different emails today

    How to stop a Web site generating spams are sent to me - it is all associated with the use of viagra and I had 10 different emails today

    Thank you

    You need to ask the experts of Hotmail one.
     
     
    Help for Windows Live Hotmail can be found in this forum.
    http://answers.Microsoft.com/en-us/windowslive/Forum/Hotmail?tab=all 

    Help for Outlook.com is located in this forum
    http://answers.Microsoft.com/en-us/windowslive/Forum/mail?tab=all
     
  • How can we regenerated certificate of development mac for future use.

    How can we regenerated certificate of development mac for future use.

    Probably better off posting it here:

    Developer forums

  • How can I change my att iphone 4S for the sprint network

    How can I change my att iphone 4S for the sprint network

    You can not.  AT & T phone is a GSM, CDMA Sprint.

    Sorry

  • How and where can I buy a CD for the installation of 3.6.6?

    I have dial-up Internet. After downloading 3.6.6 I can't open because of "file is corrupt". How and where can I buy a CD for the installation of 3.6.6?

    Operating system

    Microsoft Windows XP

    You can not. This problem may be caused by anti-virus software. Try to disable it while you install Firefox. Don't forget to reactivate!

  • How will I know if I am being charged for the use of data on the mini2 ipad

    How will I know if I am to be charged or billed for usage on my ipad mini data 2?

    Hello

    You can be charged for the use of data on an ipad, if it has a SIM card

    Cellular data.

    If your home wifi is unlimited you will not be charged more.

    Unless your WiFi has a hat of data ie download limit.

    See you soon

    Brian

  • How can I get a driver 64 bits for the mouse?

    I installed W7 to xp pro. W7 is a 64-bit operating system, xp is a 32-bit. My mouse (Logitech USB PS/2 optical mouse does not work.) When I check the drivers, they are 32-bit and when I install new drivers, they are also 32-bit. How can I get a driver 64 bits for the mouse?

    Original title: mouse drivers

    The game, August 28, 2014 16:18:16 + 0000, WILLROSS wrote:

    I installed W7 to xp pro. W7 is a 64-bit operating system, xp is a 32-bit. My mouse (Logitech USB PS/2 optical mouse does not work.) When I check the drivers, they are 32-bit and when I install new drivers, they are also 32-bit. How can I get a driver 64 bits for the mouse?

    I don't know if there is a driver 64-bit Windows 7 to your
    mouse. It's Logitech to decide or not to produce a.
    Check on their website to see if it exists. If not, you
    are out of luck, but fortunately that a new mouse shouldn't be very
    Dear.

  • How to check what Qt application is run for the first time?

    How to check what Qt application is run for the first time? I need for the creation of trial version of my application. Any help is greatly appreciated

    Probably use file data and put an I_ran_at_least_one_time file and verify its existence. This file is not accessible to the user and is not changed even if you upgrade the application.

Maybe you are looking for

  • Wrong recovery DVD, how to get a new one?

    Hello long story short, I need to recover my Qosmio X 500 - 121 and created recovery DVD with the tools of Toshiba. Everything was fine, the control of the DVDs showed no error so I started to recover my system. Well the recovery failed after the rem

  • Motherboard manufacturer: hidden...

    Hello As you could see in my other previous topics, I am quite interesting in an old Satellite 1670 CDS of tuning. To do this, I must of course know the manufacturer of the motherboard of the machine. Best software to identify the material (such as S

  • Windows downgrade satellite C855 - 21q 7

    Hello I downgrade my c855 - 21q (short only model no PSCBYE) of windows 8 for windows 7 pro 64-bit. But my AMD Radeon HD 7610 m graphics card was not recognized. I found all the other drivers, but the resolution is only 1024 x 768... Then I go to the

  • johnbclay

    How to open csv files?

  • Deviceconnection pc and printer wireless

    There is a problem with the wireless connection.  It worked once.  I can't find a detailed on the connection instruction The wireless connection is on