How to select the lines/odd table...

How to select lines / odd in a table?
Help, please.

Published by: vaibhav on May 7, 2012 05:30

This can be done by using the function mod like this:

For even rows
Select * from (select rownum rn, nom_table.* from tableName) where mod (rn, 2) = 0;

For the odd lines
Select * from (select rownum rn, nom_table.* from tableName) where mod (rn, 2) = 1;

Tags: Database

Similar Questions

  • How to get the line object table View

    Hello

    I use Jdev 11.1.1.7

    My requirement is, there are two ways I can get lines in my logic, you're based getFilteredRows (RowQualifier) and vo.executeQuery () - on a specific condition or I should consider first or later...

    getFilteredRows() returns the line [], I need to find a way to make [Row] of the View object properly after ececuteQuery() on the VO... When I use vo.getAllRowsInRange () which returns only a single line, but what iterate the VO even, I see that there is more than one line... How can he get all the range of the VO table?

    Thank you

    You can set the size of the field-1?

    ViewObjectImpl (Oracle ADF model and Business 10.1.2 API components reference)before calling getAllrowsinRange?

  • How to select a line of table on click using javascript?

    I have an ADF table with some data. If the user clicks on a cell in the table, I want to do something for the whole line.

    However, the event.getSource () method only gives me the column that was clicked.

    How can I find the line using Javascript?

    Hello

    Try the approach given by frank at https://forums.oracle.com/thread/2205398

  • How to select the lines whose value min on a specific column

    I have a query:

    Select

    m.X1,

    round (to_date (l.y1, ' dd/mm/yyyy hh: mi: SS AM')-m.x 2, 0) as numofdays

    Of

    Table 1 m,

    Table2 l

    where

    l.x3 = m.x3 and

    TO_DATE (l.y1, ' mm/dd/yyyy hh: mi: SS AM' ') > = TO_DATE('01012013','MMDDYYYY') and

      ... ;

    and I got this result table:

    x 1 (ID) NumOfDays
    0015

    001

    1000220033003140 °000566......

    several IDs have several values on the second column, I want to have only separate IDs with smaller "numofdays' like this:

    x 1 (ID) NumOfDays
    0015
    0022
    0031
    0040
    00566
    ......

    Any ideas?

    Hello

    The more general and more versatile way is a Request of Top - N:

    WITH got_r_num AS

    (

    Select

    m.X1,

    round (to_date (l.y1, ' dd/mm/yyyy hh: mi: SS AM')-m.x 2, 0) as numofdays

    ROW_NUMBER () OVER (PARTITION BY m.x1

    ORDER BY to_date (l.y1, ' mm/dd/yyyy hh: mi: SS AM' ')-m.x 2

    ) AS r_num

    Of

    Table 1 m,

    Table2 l

    where

    l.x3 = m.x3 and

    TO_DATE (l.y1, ' mm/dd/yyyy hh: mi: SS AM' ') > = TO_DATE('01012013','MMDDYYYY') and

    ...

    )

    SELECT x 1, numofdays

    OF got_r_num

    WHERE r_num = 1

    ;

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

    Note that the subquery (got_r_num) is exactly what you have posted, only with a new column (r_num) added to the SELECT clause.

  • How to choose the line PFI to use on the port of the 5761?

    I understand that the VIDEO that I use on my DAC 5761 allows me to access 8 PFI lines.  However, when I access my 5761 devices in the project window by clicking the "+" next to the name of the module, I see that 'PFI Input' and ' output PFI.  I tried to get this to send a signal in the past, but I have been unable to determine how to select the line PFI I want to use.   How can I select the PFI line?

    Any ideas?  I was able to get the my AWG PFI (5422) for work and it is amazing.  I want to order an attenuator digital step for a ground penetration radar that I develop.

    Your time and your help is very appreciated.

    PS: I have worked with this PXI system (chassis, embedded controller, FPGA digitizer 5761 and AWG) for 1 year and I am afraid that it is time to learn this one way or another.

    Good day!

    -Daniel

    I found the solution. In addistion to the node which is visible in my previous post, there must be a node to enable PFI write with an entry of decimal number indicating the line is activated. Then, there must be a node PFI active connector, set to true. Not sure if the node of the latter is really necessary, however. Otherwise above examples should work as is.

  • How to select the path to a file icon button to a table?

    I have a SYSTEM_PATHS table name. All physical access paths as 'where the forms of execution are located' or 'where performance reports are located' are stored in its ranks for example (C:\HRMS\FORMS\)
    I memorized the path of the icon files (.ico) inside. The forms of execution can take the path of the icons for the buttons of this table. And access the icon of the chosen path. I use forms 6i. Normally, I put the path of the icon files in the nerve to property of the button as (C:\HRMS\ICON\). But now, here, I don't have a path but its in the column of a table. How to select the path to a file icon button to a table using forms 6i?

    Hello Gul,

    have you tried

    set_item_property('Button name',ICON_FILENAME,);
    

    Concerning
    Marcus

  • How to select the second row in three?

    I use answers and are in a situation where some IDs have three related lines.

    I'm trying to flatten it so that each of these lines is displayed as a column.

    So instead of:

    ID fruits

    1 Apple

    2 Orange

    Peach 2

    2 plum

    Mango 3

    I want to see

    1 Apple

    2 plum fishing orange

    Mango 3

    I can get to the first (orange) and the last (plum) with MIN and MAX.

    For example (fruit) MIN or MAX (fruit)

    Answers how select the line in the middle (fishing)?

    Thank you!

    Use LISTAGG, but then to analyze the first second and third in their own columns using regular expressions... or change the data structure to match the use of the information (use is the master, not the slave)

  • How to draw the line under STROKE and fill of an object in illustrator cc? Ideas: D...

    How to draw the line under STROKE and fill of an object in illustrator cc? Any ideas ...

    Aleksandar,

    If I (put) understand it, you will need to divide the object. You can:

    (1) select the object and Ctrl / Cmd + C + F, and then remove the filling of the copy and the blow of the original;

    Draw 2) and drag the new piece down between Division 1 objects) in the layers palette, or select 1 copy) and Ctrl / Cmd + C + F + X + F or similar.

  • Select the line with the smallest Beach

    Hello
    I am trying to build a complex query...
    He must select the line with the inner range...

    I'll explain for example:
    Location of poolsize ID value
    1 32 8
    2 40 6
    3 42 8
    4-36-3

    I want to select the line where the fork between value and value + poolsize is shared also with the other location...
    so:
    1 is 32-40 (in A place)
    2 is 40-46 (in place)
    3 is 42-48 (location B)
    4 is 36-39 (at location B)

    4 is located at 1 (and there are different places...) so sql must return to the fourth line.

    Any help will be appreciated!

    Thank you
    fcbman

    Hello

    fcbman1899 wrote:
    Hello
    I am trying to build a complex query...
    He must select the line with the inner range...

    I'll explain for example:
    Location of poolsize ID value
    1 32 8
    2 40 6
    3 42 8
    4-36-3

    Whenever you have a problem, please post CREATE TABLE and INSERT statements for your sample data, in order to let the people who want to help you re-Ridge the problem and test their ideas.
    See the FAQ forum {message identifier: = 9360002}

    I want to select the line where the fork between value and value + poolsize is shared also with the other location...
    so:
    1 is 32-40 (in A place)
    2 is 40-46 (in place)
    3 is 42-48 (location B)
    4 is 36-39 (at location B)

    4 is located at 1 (and there are different places...) so sql must return to the fourth line.

    To find all the rows that are within the range of at least one other line with another location:

    SELECT     *
    FROM     table_x  m
    WHERE     EXISTS (
                 SELECT  1
                 FROM        table_x
                 WHERE   location          != m.location
                 AND        value          <= m.value
                 AND        value + poolsize     >= m.value + m.poolsize
                )
    ;
    

    When you talk of the "" * most * inner range ", do you mean that you might have another line, such as"

    INSERT INTO table_x (id, vlue, poolsize, location) VALUES (5, 37, 1, 'C');
    

    which is inside the range of id - 4, and that's why you wouldn't have id = 4? If so, include examples in the results and data sample yout. You can do this with a query CONNECT BY, or, depending on your version of Oracle, a WITH recursive clause.

  • Printer all in one HP3520 - how to select the wireless network and enter the WEP key?

    According to print my wireless network is detected.

    How to connect the! @# % printer $ fo the wireless network and enter the WEP key?

    Instructions on the HP site tell me to selet NETWORK on the printer control panel.  Well, there's a way to select the NETWORK from the control panel.  It is not an option for him.

    I downnloaded and installed the latest drivers.

    I have restored the default settings.

    How to select the wireless network and enter the WEP key?

    All of HP's instructions seem to be for a newer printer with a touchscreen.

    I want that the printer is connected to my main computer via the USB port.  I want to be able to print wireless phones and tablets.

    My 3520 is not a 'touch Screen' and it has wifi.

    However, the following work:

    Try to open the HP Deskjet 3520 icon, open the utilities tab, click on convert USB wireless, by following the steps on the screen.

    This leads me to believe that ONLY the wireless doesn't work.  I know now that the part of the sentence "Convert USB to wireless connection" is supposed to mean "works like USB and wireless.

    Thank you for your help

  • How to save the data in table 1 d to Excel in continuous

    Mr President.

    How to save the data in table 1 d to Excel at all times, so that all the data of the first scan must be placed first thought and all the data from the second analysis must be placed on the second Board and continue on the street...

    Sy@m...

    Hi Sy@m

    Here is a vi that might give you a few ideas to try:

  • How to select the pieces of my image in black and white?

    How to select the pieces of my image in black and white? FOW example letter J or the circle or the two together?

    jaguar_growler_blur best8.png

    It's actually pretty easy, but I have to assume that you know a few basics in Photoshop

    (1) open your existing image

    (2) double click on the layer and the 'layer style' appears. In the mix if area set the sliders so the whites in the image disappears

    You will be left with just the black elements in design

    (3) duplicate layers

    and merge them together

    to give a standard layer

    (4) ctrl or cmd click on the layer to select and create a layer mask

    (5) you now have a mask of the image. Duplicate the layer, click alt or option, click on the layer mask to call

    (6) the blacks and the whites are not completely black and white for the use of levels to adapt to the absolutes

    (7) now you have to decide what you want to select. In this case, I chose the lettering and simply covered everything else to the top with black. You do this by lasso selection and fill and items when it's delicate brush just the details with a black brush "hard." .

    (8) at this stage, you can do what you want you have a layer mask. So you can color the text for example

    or place in a background color and apply a layer as Beveling effect

    Hope that makes some sense. It is much easier to do than to describe.

  • How to write the even-odd fill feature?

    How to write the even-odd fill feature?

    Maybe like this:

    app.executeMenuCommand ('* ');

    01.jpg

    There is a command in the PathItem object named evenodd. I think that if you change the property of evenodd and get a member of a composite path path, you can achieve a desired result.

  • How to select the Type of industry 8.3 Professional P6

    Hi all

    According to the document to change the type of industry for 8.3 Professional P6, I had to go to P6, Application settings, general link.

    But in the P6 Web client to administrator > Application Configuration > General there is no option is available for the type of industry.

    Let me know, how to select the type of industry?

    You can see the OPINION score "How to change the Type of industry P6 P6 PPM (Professional), P6 EPPM E8.2 and later versions (Doc ID 1386047.1)".

    Also can you paste a screenshot here.

  • How to select the same forms of color in the adobe flash program?

    How to select the same forms of color in the adobe flash program? for example, we assume that 10 forms of rectangle. 3 of them are red and others are green. I want to use only one method or click to select 3 of them. Please help me

    Thanks kunter

    You can use Ctrl + F.

Maybe you are looking for

  • Elitepad 900: Windows 10

    While improving my Elitepad to Windows 10 900, it turned off in the process (he says he should reboot several times), but never turned back.  Now, the tablet will not illuminate at all (nothing happens). I unplugged and tried to start on battery, no

  • How do we uninstall Megabackup?

    I have Megabackup on my computer.  I want to remove it.  I leave Megabackup - then went to applications - Megabackup moved to the trash.  I got a box that said that I could not put it in the Trash because it was open.  How can I close Megabackup and

  • Missing DLL files

    Hey I have a problem... I recently labview on my computer... New installation... The problem is that any drivers I install for any instrument keithley, I get the error "KE - _32.dll ' (-is synonym of 6485 or 622 x) missing file... I installed the sof

  • I can't sign in to my account for 3 days.

    I tried to reset the password, but unfortunately I forgot my secret answer as well. In addition, the alternative e-mail address is my own e-mail address.

  • Visual C++ 2005 installation Error Code 1606 Redist

    When I downloaded the Microsoft Visual C ++ 2005 Redistributable for windows Vista until the download is complete, I received this (Error 1606. Could not access network location % APPDATA%\.) !! If the ideas? I also had this same error also happens w