Divide the lines into different columns

HRCM_RECRUITMENT_NO amount facilities
R000035 MONEY, FOOD, BASIC 0,0,0

I did the result like this


Now, I want to like this


HRCM_RECRUITMENT_NO facilities Facilities_1 Facilities_2 amount Amount_1 Amount_2

R000035. CASH FOOD BASIC 0 0 0


Please help me! Tell me what to do?

Hello
This will not work unless you have constant facilities for all HRCM_RECRUITMENT_NO.

SQL> with h as
  2  (select 'R000035' HRCM_RECRUITMENT_NO ,'CASH,FOOD,BASIC' Facilities ,'0,0,0' Amount from dual) 

  3  select HRCM_RECRUITMENT_NO,regexp_substr(Facilities,'[^,]+',1,1) f1,
  4         regexp_substr(Facilities,'[^,]+',1,2) f2,
  5         regexp_substr(Facilities,'[^,]+',1,3) f3,
  6         regexp_substr(Amount,'[^,]+',1,1) A1,
  7         regexp_substr(Amount,'[^,]+',1,2) A2,
  8         regexp_substr(Amount,'[^,]+',1,3) A3
  9  from h;

HRCM_RE F1   F2   F3    A A A
------- ---- ---- ----- - - -
R000035 CASH FOOD BASIC 0 0 0

Twinkle

Tags: Database

Similar Questions

  • Divide the line into several columns

    Hi all

    I have a question where I want to divide the line into multiple columns based on the delimiter ' |'.

    Staging of Table structure: People_STG, I have people in it.

    Create table People_STG(col1 varchar2(4000));


    Insert into People_STG(Emp_id|) User name | FirstName. LastName. JobTitle | hire_date | Location_id)


    SELECT REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 1) EMP_ID,
           REGEXP_SUBSTR ( COL1, '[^|]+', 1, 2) USERNAME,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 3) FIRSTNAME,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 4) LASTNAME,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 5) JOBTITLE,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 6) HIRE_DATE,
           REGEXP_SUBSTR ( COL1, '[^,|]+', 1, 7) LOCATION_ID
    FROM PEOPLE_STG
    WHERE length(regexp_replace(COL1, '[^|]', '')) = 14;
    

    But I am facing a problem here, as in some lines, function is null, but when I run the above query, it is not recognizing the empty element and inserting Hire_date values of function and location_id in Hire_date where function is null.

    for example: 1 | akash51 | Akaksh | C | 22/11/14 | 15

    Here the function is null, so when I run top to divide query it will insert 11/22/14 in the function column and 15 in Hire_Date.

    Please need help on this one.

    Oracle Version: 11.2 g

    Thanks in advance,

    Akash.

    There are different techniques to cope with this.  Is a simple...

    SQL > ed
    A written file afiedt.buf

    1 with t as (select 1 | akash51 |) Akaksh | C | 22/11/14 | 15' as col1 of union double all the
    2 Select 2 | akash52 | Akaksh | C | Jobs jobs | 23/11/14 | 15' of the double
    3            )
    4  --
    5. end of test data
    6  --
    7 select trim (REGEXP_SUBSTR (COL1, ' [^, |] +', 1, 1)) EMP_ID,.
    8 toppings (REGEXP_SUBSTR (COL1, ' [^, |] +', 1, 2)) USERNAME,.
    9 garnish (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 3)) FIRSTNAME,
    10 pads (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 4)) LASTNAME,.
    11 garnish (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 5)) JOBTITLE,.
    12 pads (REGEXP_SUBSTR (COL1, ' [^, |] +', 1, 6)) HIRE_DATE,.
    13 garnish (REGEXP_SUBSTR (COL1, ' [^, |] +' 1, 7)) location_id
    14 * from (select replace (col1, ' |)) ',' | as col1 of t)
    SQL > /.

    EMP_ID USERNAME FIRSTNAME LASTNAME, JOBTITLE HIRE_DATE LOCATION_I
    ---------- ---------- ---------- ---------- ---------- ---------- ----------
    1 akash51 Akaksh C 22/11/14 15
    2 akash52 Akaksh C Job 23/11/14 15

  • divide a line into several columns

    Hi all

    I have a csv file with the information that looks like

    Dispatch_id/vendor_id

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

    1234/111

    1234/333

    1234\222

    1 234 111

    1234 111

    "1234/111.

    1234/111

    I want the output to be

    Vendor_id Dispatch_id

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

    1234 111

    333 1234

    222 1234

    1234 111

    1234 111

    1234 111

    1234 111

    I tried to use REGEXP_SUBSTR like this:

    SELECT REGEXP_SUBSTR('1234/111','[^/]+') DISPATCH_ID,

    VENDOR_ID REGEXP_SUBSTR('1234/111','[^/]+',1,2)

    BY DOUBLE D

    and I got the output

    Vendor_id Dispatch_id

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

    1234 111

    What is good!

    But my problem is that I have different delimiters in each line (example: ' \ ',' ',' ', "',)

    How can I mention all these delimiters in query REGEXP_SUBSTR?

    Or

    Is there another way I can write a simple query?

    Please help me!

    1058268 wrote:

    Hi all

    I have a csv file with the information that looks like

    Dispatch_id/vendor_id

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

    1234/111

    1234/333

    1234\222

    1 234 111

    1234 111

    "1234/111.

    1234/111

    I want the output to be

    Vendor_id Dispatch_id

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

    1234 111

    333 1234

    222 1234

    1234 111

    1234 111

    1234 111

    1234 111

    I tried to use REGEXP_SUBSTR like this:

    SELECT REGEXP_SUBSTR('1234/111','[^/]+') DISPATCH_ID,

    VENDOR_ID REGEXP_SUBSTR('1234/111','[^/]+',1,2)

    BY DOUBLE D

    and I got the output

    Vendor_id Dispatch_id

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

    1234 111

    What is good!

    But my problem is that I have different delimiters in each line (example: ' \ ',' ',' ', "',)

    How can I mention all these delimiters in query REGEXP_SUBSTR?

    ...

    Sure.

    "[^ /]" refers to all characters except ' / ' "

    ' [^ /------"]': the set of all characters except" / ', ' \' "' (single quote) or" "(space).  So, if you can list all the possible delimiters, just put them all inside square brackets, like this:

    SELECT REGEXP_SUBSTR (combined_id, "[^ / \"]' 1, 1 ") AS dispatch_id - omit the last 2 arguments, if you want

    , REGEXP_SUBSTR (combined_id, "[^ / \"]', 1, 2 ") AS vendor_id

    FROM table_x;

    If you would care to post CREATE TABLE and INSERT instructions for some examples of data, then I could test it.

    If it's easier to display the characters which may not be delimiters, then lose the ^ right after ' ['.]  For example

    "[0123456789]" which is equivalent to

    '[0-9]' and is also equivalent to

    "[[: digit:]]"

  • Divide a line into several points

    I see that I can use SDO_LRS. SPLIT_GEOM_SEGMENT to divide a line into one only point (and get 2 lines resulting).

    However, someone at - it an idea how can I split a line, at several points, in several segments? I need to do for the number of lines, so a function or procedure would be nice as appropriate.

    Thank you

    Published by: ronnie-m on April 22, 2013 04:43

    Sorry for pasting quick and dirty, was a minimum on time and problems with my dev env.

    Perhaps still not the best outline but hoping there more explanaition should be ok.

    Concerning

    Luke

    select l.line_id,                                                                                                                                         -- line line_id
            ROW_NUMBER() OVER (PARTITION BY l.line_id order by l.rowid )                                                                              -- optional sub id, to make submains unique in combination with line_id (guess this will be ordered
            sdo_lrs.CLIP_GEOM_SEGMENT(SDO_LRS.CONVERT_TO_LRS_GEOM(l.geometry ), branch_measure, branch_next_measure, 0.05)              -- actual clipping, needs convert to LRS apparently, start end end branch measure
            from
                   line l,                                                                                                                                            -- rejoin mainly to get the geometry again
                             (
                             select line_id,                                                                                             -- line_id
                                     branch_measure,                                                                                                              -- measure of the branches (from CASE WHEN
                                     LEAD(branch_measure, 1, 0) OVER (PARTITION BY line_id order by branch_measure) branch_next_measure   -- Analytical function LEAD will get the next branch measure form the following ordered records per line_id
                             from
                                  (
                                  select a.line_id,                                                                                                              -- line_id
                                          CASE when                                                                                                              -- CASE (assuming branch will touch only at one point) it will be either the start or the endpoint
                                                      sdo_lrs.find_offset(                                                                    -- of the branch that will TOUCH, we are checking this based on the offset which one is closest
                                                                               SDO_LRS.CONVERT_TO_LRS_GEOM(a.geometry),                                   -- requires convert to LRS geom
                                                                               sdo_lrs.geom_segment_start_pt(b.geometry),                                   -- if it is neccessary to deal with multiple possibilities we might better use a temp table to evalute better
                                                                               0.05                                                                                -- TOLERANCE (all tolereance should be seen with respect to resolution of the data
                                                                               )                                                                   -- IF feasible, let spatial take care of the snapping
                                                      <
                                                      sdo_lrs.find_offset(
                                                                               SDO_LRS.CONVERT_TO_LRS_GEOM(a.geometry),
                                                                               sdo_lrs.geom_segment_end_pt(b.geometry),
                                                                               0.05
                                                                               )
                                            THEN
                                                 sdo_lrs.find_measure(
                                                                           SDO_LRS.CONVERT_TO_LRS_GEOM(a.geometry),
                                                                           sdo_lrs.geom_segment_start_pt(b.geometry),
                                                                           0.05
                                                                           )
                                            ELSE sdo_lrs.find_measure(
                                                                            SDO_LRS.CONVERT_TO_LRS_GEOM(a.geometry),
                                                                            sdo_lrs.geom_segment_end_pt(b.geometry),
                                                                            0.05)
                                              END branch_measure
                                  from line a, line b                                                                                                      -- self join using main and branch that touches
                                       WHERE sdo_relate(b.geometry, a.geometry, 'mask=TOUCH') = 'TRUE'                                     -- Should be replaceable with sdo_join + self join optimsation
                                       AND a.line_type = 'main'
                                       AND b.line_type = 'branch'
                                  union all                                                                                                                        -- union all to get the 0 measure (startpoint) in the subquery as the beginning of the first clipping segment
                                       select line_id, 0 as branch_measure
                                       from line
                                  union all                                                                                                                         -- union all to get the last measure (endpoint) in the subquery as the beginning of the first clipping segment
                                       select line_id,
                                                 sdo_geom.sdo_length(geometry, 0.05) as branch_measure                                                  -- maybe better to use actual get measure form lrs endpoint but is the same if no spaecial measure are used
                                       from line
                                  )
                             ) b
                             where
                             branch_measure < branch_next_measure                                                                                          -- avoid duplicates (2 branches at same location on main (but also the last + 1 segment with last measure and default value 0 from LEAD
                             and
                             l.line_id = b.line_id                                                                                                              -- join on line-id to reuse the geom (or potential other attributes from original lines
                             ;
    
  • How to divide the screen into two parts in order to see the two different parts of the same file? [Suggestion] [Android]

    I am Brazilian and I use Adobe Acrobat Reader DC a lot. I would suggest an implementation of features present in the PC, I missed a lot of things on Android, which is 'New window' or something like that, like split the screen into two parts in order to see the two different parts of the same file.

    For smartphones, its use is restricted, but for tablets, it can be really useful, because it allows the display of two distinct points of the same file,

    I have reduced considerably the use of paper using this application, however, I need to navigate the file always pick up a few points seen earlier, which causes a lot of discomfort compared to printed documents.

    This is a suggestion, but I would like it to be considered.

    Thank you for your request. We have taken note of the same and must try to integrate it into one of our future releases.

    Thank you.

  • Divide the string into rows according to the space

    I'm using Oracle 11.2.0.3.  I need a faster way to divide the organization names based on space as possible just using SQL.

    with org as

    (

    Select 1 org_pk, org_nm 'ALL american, INC.' of any double union

    Select org_pk 2, org_nm "COMPANY A.G" Union double all the

    Select org_pk 3, org_nm "GROWTH FUND SPONSORS and SONS, Inc." of the double

    )

    Select * org;

    Result, I need is

    1. ALL THE

    1 american

    1, INC.

    2 A.G

    2 COMPANY

    3. THE GROWTH

    3 FUND

    3 SPONSORS

    3 and

    3 WIRES,

    3 INC.

    Thank you very much.

    You can use GROUP BY with LISTAGG or XMLAGG. And ordinalite allows to preserve order:

    with org as)

    Select 1 org_pk, org_nm 'ALL american, INC.' of any double union

    Select 2 org_pk, 'A.G COMPANY' org_nm of all the double union

    Select org_pk 3, org_nm "GROWTH FUND SPONSORS and SONS, Inc." of the double

    )

    Select org_pk,

    x.org_nm,

    x.o

    org,.

    XMLTable)

    "ora: tokenize(.,"").

    by the way ' ' | org_nm

    columns

    path of varchar2 (4000) to org_nm '.'.

    o for the ordinalite

    ) x

    where x.org_nm is not null

    /

    ORG_PK ORG_NM O
    ---------- ------------------------------ ----------
    1 ALL                                     2
    1 American 3
    1 ,INC                                    5
    2 A.G                                     2
    2 COMPANY 4
    3 GROWTH                                  2
    3 FUND                                    3
    3 4 SPONSORS
    3 and                                     5
    3 SONS,                                   6
    3 INC.                                    7

    11 selected lines.

    SQL >

    However, I would like to use SUBSTR/INSTR plain + CONNECT BY if the volumes are large or performance is important.

    SY.

  • Splits the string into two columns

    Can someone please help me the following

    I want to divide into two columns URL and ID /cfd/abc.html,/night/aaa/Page1,/can/MLP/Page2|107

    Result must be

    Temporary table
    < font color = "red" > URL < / police > < font color = 'blue' > ID < / make >

    < font color = "red" > /cfd/abc.html < / police > < font color = "blue" > 107 < / make >

    < font color = "red" > / night/aaa/page 1 < / police > < font color = "blue" > 107 < / make >

    < font color = "red" > / can/MLP/Page2 < / police > < font color = "blue" > 107 < / make >


    There can be N number of comma separated URLs, but there will be only 1 separate ID which is the vertical bar (|)

    Try this,

    SQL> WITH T
      2       AS (SELECT  '/cfd/abc.html,/night/aaa/Page1,/can/MLP/Page2|107 ' str FROM DUAL UNION ALL
      3           SELECT  '/cfd/def.html,/bbbb/bbbb/Page1,/lll/MLP/Page3|108 ' str FROM DUAL)
      4  SELECT REGEXP_SUBSTR ( str, '[^,|]+', 1, lvl) URL,
      5         REGEXP_SUBSTR ( str, '[^|]+', 1, 2) ID
      6    FROM T,
      7         (SELECT LEVEL lvl
      8            FROM (SELECT MAX (LENGTH (REGEXP_REPLACE ( str, '[^,]'))) mx FROM T)
      9          CONNECT BY LEVEL <= mx + 1)
     10   WHERE Lvl - 1 <= LENGTH (REGEXP_REPLACE ( str, '[^,]+'))
     11   order by id,lvl;
    
    URL                                                ID
    -------------------------------------------------- -------------------------------------------------
    /cfd/abc.html                                      107
    /night/aaa/Page1                                   107
    /can/MLP/Page2                                     107
    /cfd/def.html                                      108
    /bbbb/bbbb/Page1                                   108
    /lll/MLP/Page3                                     108
    
    6 rows selected.
    
    SQL> 
    

    G.

  • divide the rectangle into pieces with an inner glow

    I have a rounded rectangle that I need to divide it into 3 parts (upper, middle, lower) while applying an inner glow effect to THE ORIGINAL shape. Anyway I tried this the inner glow is applied to all parties to all parties, including the internal limits of the parties.

    Any ideas?

    1. Draw the rounded rectangle.
    2. Divide at the appropriate places.
    3. Close the top resulting and substantive way.
    4. Join the two as a result of the railways; then close them.
    5. Apply a white fill all three.
    6. Apply the line wished to all three.
    7. Select all three. Group them.
    8. Apply the inner glow effect to the selected group.

    JET

  • dividing the dataset into regions using sdo_relate

    Hi all

    I have difficulties subdivision my dataset in different regions. I have the data space of the city of auckland and found the coordinates of the lower left and limited right of data. What I want to do now is to break this dataset into 9 individual regions and assign a code to each region. I tried to use subsequently issue with not much luck...

    Select a.link_id in the nz_testlinks_auck where mdsys.sdo_relate (a.GEOM,
    MDSYS. SDO_GEOMETRY (2003, null, null, mdsys.) SDO_ELEM_INFO_ARRAY (1,1003,3),
    MDSYS. SDO_ORDINATE_ARRAY(174.7083,-37.0141,174.7910,-36.9544)), "mask = ANYINTERACT querytype = FENΩTRE") = "TRUE";

    When I put the output into a table data and display the data, I notice that the rectangle has chosen a lot more data than what was actually defined in the query. I have been using the model of network data and MapBuilder Editor to check the data and contact information.

    And when I try to create another rectangle for another region next to each other like that...

    Select a.link_id in the nz_testlinks_auck where mdsys.sdo_relate (a.GEOM,
    MDSYS. SDO_GEOMETRY (2003, null, null, mdsys.) SDO_ELEM_INFO_ARRAY (1,1003,3),
    MDSYS. SDO_ORDINATE_ARRAY(174.7910,-37.0141,174.8736,-36.9544)), "mask = ANYINTERACT querytype = FENΩTRE") = "TRUE";

    He again selects a rectangle more great selection of half of the data of the previous selection rectangle as well.

    Please help me solve this problem.

    Look forward to your responses.

    Avinash

    Avinash,

    Do you have geometries that cross your limit of rectangle, as a long line, or a large polygon? What rectangle you plan such a line or polygon to appear in?

    Or would you say that the geometries that are completely disjoint from your rectangle are chosen? If you think that this is the case, try the sdo_geom.relate with the mask "determine" in order to verify the relationship between your rectangle and one of the unexpected geometries.
    http://download.Oracle.com/docs/HTML/B14255_01/sdo_objgeom.htm#BGHCDIDG

    If you want to be sure that nothing is selected twice by your rectangles the ANYINTERACT mask is probably not a good choice. A = INSIDE + DOMMAGESCAUSDSPAR mask mask will be better, but you still have to decide what to do with stuff that crosses.

    Matt

  • How to retrieve the parent and the child in different columns when they exist in a single column.

    For example, my table contains data in a column as follows.

    COLUMN_DATA

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

    A00 FOOD 0

    A01 0 DENTAL

    A02 0 PLASMA

    A01A0 CLEAR

    A02A0 CHANNEL

    A01A1 ANTACIDS

    A01A2 ANTACIDS + Napthalone

    A01A3 ANTACIDS + Olive

    A02A1 ACIDS

    A02A2 PLASMAACIDS

    Now, there is a relationship between codes. Four level hierarchy is maintained. EG - A01A1-> A01A0-> A01-> A00 0 0

    I want to receive data as in the format below:

    T4_CODE T4_DESC T3_CODE T3_DESC T2_CODE T2_DESC T1_CODE T1_DESC

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

    ANTACIDS A01A PLAIN A01 DENTAL A01A1 A DIGESTIVE

    A01A2 ANTIACIDES + Napthalone A01A PLAIN A01 DENTAL a DIGESTIVE

    A01A3 ANTIACIDES + Olive A01A PLAIN A01 DENTAL a DIGESTIVE

    A02A1                      ACIDS                                  A02A                        CANAL                     A02                    PLASMA                         A                ALIMENTARY

    A02A2 PLASMAACIDS A02A A02 PLASMA CHANNEL HAS DIGESTIVE

    So we must derive the level four of codes and their descriptions in different columns.

    Any help is really appreciated.

    Thanks in advance.

    And I got a simpler and more efficient way to do ds.

    with t as

    (select text

    case

    When substr (text, 4, 1) = ""

    then rtrim (substr (text, 1, 3), ' 0')

    of another rtrim (substr (text, 1.5), ' 0')

    end of the code

    , substr (text, 7) descript

    of lc_load

    )

    t2 as

    (select

    case length (t.code)

    When 1

    then 1

    When 3

    then 2

    When 4

    then 3

    When 5

    then 4

    end lvl

    , t.*

    t

    )

    Select t2_4.code

    t2_4.descript

    t2_3.code

    t2_3.descript

    t2_2.code

    t2_2.descript

    t2_1.code

    t2_1.descript

    of t2_1 t2

    Join t2 t2_2

    on t2_1.code = substr (t2_2.code, 1, 1)

    Join t2 t2_3

    on t2_2.code = substr (t2_3.code, 1, 3)

    Join t2 t2_4

    on t2_3.code = substr (t2_4.code, 1, 4)

    where t2_1.lvl = 1

    and t2_2.lvl = 2

    and t2_3.lvl = 3

    and t2_4.lvl = 4

  • About concatation, all the lines in a column

    Dear friends,

    I have to concatinate all lines as a column based on a whim of the key column.

    col1col2COL3COL4col5
    481TC_View4TC_View_A
    381TC_View3TC_View_B
    281TC_View2TC_View_C
    181TC_View1TC_View_D
    I need output like below
    col2col5
    81TC_View_A, TC_View_B, TC_View_C, TC_View_D

    I appreciate your help in this regard.

    Thank you

    Ravi

    Hi Ravi,

    That's exactly what the aggregate LISTAGG function:

    SELECT col2

    , LISTAGG (col5, ' / ') WITHIN GROUP (ORDER BY col5) AS all_col5s

    FROM table_x

    GROUP BY col2

    ORDER BY col2

    ;

    If you would care to post CREATE TABLE and INSERT statements for your sample data, and then I could test this.

  • Divide the data into separate rows

    Hi people,

    I have a request, which could be simplified as:

    with t as)

    "name select 'John', ' 7.3.2014' date_from, ' 13.3.2014 ' date_to, 'SICK DAY' reason for the double

    "" the name of Union select 'Mike', ' 28.3.2014 ' date_from, ' 2.4.2014 ' date_to, 'HOLIDAY' because of the double

    "" the name of Union select 'Tom', ' 14.3.2014 ' date_from, ' 14.3.2014 ' date_to, 'HOLIDAY' because of the double

    )

    Select * from t

    Each line includes a person's name, reason for his absence, the dates of and to.

    I would like to divide these lines in separate registers (for later analysis), so an expected output would look something like:

    with t as)

    name select 'John', ' 7.3.2014' absence_date, 'SICK DAY' reason for the double

    "the name of Union select 'John', ' 8.3.2014 ' absence_date, 'SICK DAY' reason for the double

    "the name of Union select 'John', ' 9.3.2014 ' absence_date, 'SICK DAY' reason for the double

    "the name of Union select 'John', ' 10.3.2014 ' absence_date, 'SICK DAY' reason for the double

    "the name of Union select 'John', ' 11.3.2014 ' absence_date, 'SICK DAY' reason for the double

    "the name of Union select 'John', ' 12.3.2014 ' absence_date, 'SICK DAY' reason for the double

    "the name of Union select 'John', ' 13.3.2014 ' absence_date, 'SICK DAY' reason for the double

    "the name of Union select 'Mike', ' 28.3.2014 ' absence_date, 'HOLIDAY' because of the double

    "the name of Union select 'Mike', ' 29.3.2014 ' absence_date, 'HOLIDAY' because of the double

    "the name of Union select 'Mike', ' 30.3.2014 ' absence_date, 'HOLIDAY' because of the double

    "the name of Union select 'Mike', ' 31.3.2014 ' absence_date, 'HOLIDAY' because of the double

    "the name of Union select 'Mike', ' 1.4.2014 ' absence_date, 'HOLIDAY' because of the double

    "the name of Union select 'Mike', ' 2.4.2014 ' absence_date, 'HOLIDAY' because of the double

    "the name of Union select 'Tom', ' 14.3.2014 ' absence_date, 'HOLIDAY' because of the double

    )

    Select * from t

    Please advice, how for the first example query to obtain a required output?

    Thank you

    Tomas

    SQL > with t as)
    2. Select the name of 'John '.
    3, to_date ("'07.3.2014', ' dd.mm.yyyy") date_from
    4, to_date ("'13.3.2014', ' dd.mm.yyyy") date_to
    5, 'SICK DAY' reason
    6 double
    7 union select name "Mike".
    8, to_date ("'28.3.2014', ' dd.mm.yyyy") date_from
    9, to_date ("'02.4.2014', ' dd.mm.yyyy") date_to
    10 at 'HOLIDAY '.
    11 double
    12 union select name of "Tom."
    13, to_date ("'14.3.2014', ' dd.mm.yyyy") date_from
    14, to_date ("'14.3.2014', ' dd.mm.yyyy") date_to
    15, because of "HOLIDAY".


    16 double
    17       )
    18 select name
    19, date_from + (level 1) leave_date
    20, reason
    21 t
    22 connect
    23 by level<= date_to="" -="" date_from="" +="">
    24 and prior name = name
    25 and prior sys_guid() is not null
    order 26
    27 by name
    28, leave_date;

    NAME LEAVE_DAT REASON
    ---- --------- --------
    John 7 March 14 SICK DAYS
    John 8 March 14 SICK DAYS
    John 9 March 14 SICK DAYS
    John 10 March 14 SICK DAYS
    John 11 March 14 SICK DAYS
    John 12 March 14 SICK DAYS
    John 13 March 14 SICK DAYS
    Mike HOLIDAY 28 March 14
    Mike HOLIDAY 29 March 14
    Mike HOLIDAY 30 March 14
    Mike HOLIDAY March 31, 14
    Mike HOLIDAY April 1, 14
    Mike VACATION April 2, 14
    Tom March 14 14 HOLIDAY

    14 selected lines.

    SQL >

  • How to divide the form into 2

    I created an interactive report and a form. By clicking on the button Edit in the report, taking me in a form with all the details of that particular line. Now I want to divide the elements in 2 forms, edit details, and update them at the same time. Pointers or suggestions is appreciated

    Published by: user739459 on August 17, 2011 12:59

    If you want to split because of the logical separation between the elements, you can create a new region and move some items to that. If you want to keep certain items on a single page and some on the other hand, you can copy the page and remove the items is not necessary two pages (except primary key point). Now, create a button on the first page to open the second page, passing the primary key and do the same on page two.

    Lavenu
    MaxApex accommodation
    http://www.maxapex.com

  • TB has worked fine until yesterday when I needed to send a message to more than 100. I divided the AddressBook into pieces and sent about 50 when TT502 came.

    I use TB 31.7.0, PC Windows 7. Had no problems until now. I divided the 100 addresses in groups of about 20 and sent to 3 groups. The 4th was wrong and I got the message: "too many recipients, TT502. I cut down the number of addresses, but the problem persists. I can't send all messages now, even to a single recipient. So I have a problem that does not reset when tuberculosis is turned off and restarted. Incoming is fine but I can't answer. Any ideas?

    Looks like you reach the limit of the sending of your provider. Of course sending for 1 person isn't too unless your provider has a hourly or daily limit and cut you.
    Given that the error has an associated server code the error came from your server vendors. Thunderbird would have nothing to do with it.

  • divide the data into lines

    Hello

    I have data like this.


    Person_wid industry

    111 car; Telecom


    How to divide as below


    Output:

    Auto 111

    Telecom 111


    Thank you


    SQL > test as

    () 2

    3 select person_wid 111, ' car. Telecom' double industry

    4)

    5. Select person_wid

    regexp_substr 6, (industry, ' [^;] +', 1, rn) split

    7 test

    8 cross

    9 join (select rownum rn

    10 in (select max (length (regexp_replace (industry, ' [^;] +'))) + 1 mx)

    11 test

    12                 )

    13 connect by level<=>

    14         );

    SPLIT PERSON_WID

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

    Auto 111

    Telecom 111

    2 selected lines.

    Notes on the Oracle: split delimited by a comma the way of RegExp string, second part

Maybe you are looking for

  • I think the evolution of my iMac OSX 10.8.5 El Captan. My old printer Stylus Epson colour 740 still work?

    I think the evolution of my iMac OSX 10.8.5 El Captan. My old printer Stylus Epson colour 740 still work?

  • Need repair, have no cd system

    I recently returned home to find my pc crashed, apparently because of a registry problem. He suggested a repair running with the system disk. I tried to start in safe mode by using the last known good configuration and wouldn't work. I want to try to

  • Windows 7 went blue screen when the sleep mode is activated

    Hi, it happened that Windows 7 X 64 went blue screen, when my PC has been set to the standby mode. I received the following from the Windows Event Viewer: Log name: SystemSource: Microsoft-Windows-WER-SystemErrorReportingDate: 11/03/2014-17:39:30Even

  • Choice of the router...

    Hi all What model router what should I go if I want to have a type to the less modular with 4 interfaces fastethernet, vrf and VLANs supported? C2600 series can meet the above requirement?

  • How to re - install missing USB Root Hub

    Windows 7 Home Premium 64 bit on an HP P6610F: Twice after current to run MS updates, two lost front USB ports their root hubs, but their corresponding controllers were still there. This causes their become a type 1 slower port and I get the message