produce a series of numbers to select from the shortcomings of the ID column

(1)

Suppose I have a table t that contains lines like this:

A AND B
---------- ----------
2 4
6 7

I would like to use select to produce lines with numbers between a column and column B included
for each line, like this:

Select from t...

2
3
4
6
7

(2)

Suppose I have the ID column that is lacking, I want to get the lowest < N > numbers available between the gaps.
I did some research and I can find the range of gaps, but I can't get the numbers listed separately, therefore
I ask the question (1). But is there a direct way for the list instead of going through beaches and the list.

For example, I have the ID column that has

2
5
6
7
9
2000000

I would get a select query that produces

Select...

3
4
8
10
11

I have a way to get a list of 2 to 2000000, then less than what we need to get all the
numbers of the gap, but who is not effective and may is short-term memory.

PS: before I post on this group, I did some research already on "connect by", with recursive queries.

PuraVidaOTN wrote:

I would like to use select to produce lines with numbers between a column and column B included

for each line, like this:

Assuming that no duplicates in the table...

with t as
(
 select 2 c1,4 c2 from dual union all
 select 6 c1,7 c2 from dual
)
select c1,c2,c1+level-1 c
from t
connect by c1+level-1 <= c2
and prior c1 = c1
and prior c2 = c2
and prior sys_guid() is not null;

C1 C2 C
-- -- -
 2  4 2
 2  4 3
 2  4 4
 6  7 6
 6  7 7 

Suppose I have the ID column that is lacking, I want to get the lowest numbers between the gaps.
I did some research and I can find the range of gaps, but I can't get the numbers listed separately, therefore
I ask the question (1). But is there a direct way for the list instead of going through beaches and the list.

I have a way to get a list of 2 to 2000000, then less than what we need to get all the
numbers of the gap, but who is not effective and may is short-term memory.

It's the best way in my opinion...

Or rather less, you can try outer join...

Published by: JAC on December 19, 2012 21:28

Tags: Database

Similar Questions

  • I use a PC and I used LR3. I'm a newcomer to LR, so patient with me! My problem is related to the import function. I have a photo library on an external hard drive. I slowly imported previews of the photos selected from the library in

    I use a PC and I used LR3. I'm a newcomer to LR, so patient with me! My problem is related to the import function.

    I have a photo library on an external hard drive. I've slowly been import previews of the photos selected from the library in my catalog, adding them during the import process - well. But now, I hit a problem. Another folder in my library contains several subfolders, each containing a number of photos (a mixture of RAW steals (naves) and jpg). I was importing found in my catalog each Subfile in turn, using the Add function, usually of the jpgs only from each Subfile. It works fine, until I reached a particular Subfile. For some reason when I try to import from it and select the secondary file as a Source, only the RAW (NEF) images appear in the preview pane (sorry, forgot the correct term for it!). I know that jpg files are in this auxiliary file on the external hard drive, because when I view its content in Windows, they are all there. But try as I can (choose the file under source, select the folder parent as a source, try to copy or move them, instead of adding them), nothing seems to work. Since they do not appear in the preview pane, I can't import them. It does appear that this a Subfile where the problem exists, but I don't see anything that is different from the others (names of files under all use the same structure - yyyy-mm-dd_custom name, and pictures in all subfolders are adopting the same denomination structure too - yyyy-mm-dd_sequential number_custom name.) NAVE/JPG. So what I am doing wrong? Any ideas please.

    It is possible that the images in this particular subfolder were taken in your camera in RAW + JPEG.  If so, you will need to go to preferences under the general tab and make sure the box "processing JPEG files files next to raw as separate photos" is checked.

    However, assuming that this is the case, there is really no reason to import the JPEG file if you already have the RAW file.

  • Image display according to the value selected from the bean of choice

    Hello

    I have a table with columns of bean of choice and have an another bean image

    based on the value selected from the bean of choice of a particular line, I want to display an image in the column of bean image

    and it is particularly in the line, in which the user changes the value of the bean of choice.

    Please help me

    Thank you

    Hello
    H1.

    If I choose 'user' of choice its not display any image, but I need disabled display images it

    -have you set the URI of the Image of the time of the image?
    -deleteicon_enabled.gif N deleteicon_disabled.gif

    Concerning
    Meher Irk

    Published by: Meher Irk on October 24, 2010 12:18 AM

  • ORA-22992: cannot use LOB Locators selected from the remote tables...

    Oracle 10.2.1.0.4
    Solaris 10

    We try to access a table in another database via a db_link.

    The table we are trying to access has a LOB.

    We get the following error: ora-22992: cannot use LOB Locators selected from the remote tables.

    Is there a way to get around this? We need the data in the BLOB field.

    Thank you.

    See on metalink:

    ORA-22992 has a workaround solution in 10 gr 2
    DOC - ID: 436707.1

    Werner

  • Script to move a selection from the limits of spread?

    I have a document with a difference much larger than the content in the document.

    1-oversize-pasteboard.png

    I have another template file with a gap corresponding to the size of the limits of all selected objects. I need to open this template, paste the objects, that pasted selection of objects align to the top left of the spread (aka cardboard neighborhood or work?) and then export as a PDF and .eps.

    Due to a lot of confusion about various coordinate systems, my ideal would be not having to move what that at all, but have instead, the upper left corner of the pasted content aligned with the upper left of the spread, as it is glued. Paste or paste in place makes the content where I need them. The objects are too weak.

    2-contents-pasted-too-low.png

    Even if there is a solution to paste the information where it needs to go from the outset, I would like to know how make a difference compared to the visible work area (I think it is properly known as the spread, but more commonly referred to as the mount table?) I want to just make sure I ask my question correctly so my intentions are understood).

    My first test with the following line of code produces the result seen in the next picture; only the background .eps object is moved, and it moves down.

    App.Selection [0]. Move([MyPage.Bounds[0]+myMargins.Top,MyPage.Bounds[1]+myMargins.Left]);

    3-first-try-to-move.png

    My second test is shown below; It seems also only reposition the background image, but something moved too far down and to the right. It seems that it may be of the same size and shape, like spread which I copied objects. The limits of selection have the right size when I stuck first the object in the new document, until the line of code to change the geometric limits has been executed.

    App.Selection [0] .geometricBounds = [myPage.bounds [0] + myMargins.top, myPage.bounds [1] + myMargins.left, myPage.bounds [2] - myMargin s.bottom, myPage.bounds [3] - myMargins.right];

    4-2nd-try-to-move.png

    Also, previous attempts (until I added the image of the Tiger, the text to its immediate left and a red rectangle behind the Tiger) saw all objects selected EXCEPT the background .eps image move upward and in the right position using app.selection [0] .geometricBounds.

    Any help would be greatly appreciated. Here is the code and a screenshot of the objects on the layer that are involved.

    indesign #target - 11.064 / / CC 2015

    myDoc = app.activeDocument;

    myPages = app.activeDocument.pages;

    myActivePage = app.activeWindow.activePage;

    // 1. Select and copy everything on this document activePage

    App.Select (SelectAll.All);

    App.Copy ();

    // 2. Open the template file and paste

    whichExportTemplate = "FCILG";

    myTemplateFolder = ' / Users/user/Documents /!  "Resources / models / Ted signs / Tags ';

    sFileName = myTemplateFolder + "/" + whichExportTemplate + ".indd".

    sFileName = sFileName.replace (/ % 20/g, "'" ");

    newDoc = app.open (File (sFileName));

    app.pasteInPlace ();

    App.Select (SelectAll.All);

    // 3. POSITION IT

    var myPage = myActivePage;

    var myMargins = myPage.marginPreferences;

    App.Selection [0] .geometricBounds = [myPage.bounds [0] + myMargins.top, myPage.bounds [1] + myMargins.left, myPage.bounds [2] - myMargin s.bottom, myPage.bounds [3] - myMargins.right];

    App.Selection [0]. Move([MyPage.Bounds[0]+myMargins.Top,MyPage.Bounds[1]+myMargins.Left]);

    // 4. Save the new file

    // 5. Close

    5-layers.png

    Would you mind bringing together all elements of the page on the page, you have a single object to process after duplication (I prefer duplicate() on app.copy () / app.pasteInPlace ()) without selecting anything? Just answer has all the elements of the page on your source page to add a group and manage this unique group object.

    Quick and dirty:

    //TWO InDesign documents are open
    //The SOURCE document is the ACTIVE one
    
    var myTargetDoc = app.documents[1];
    
    myTargetDoc.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;
    myTargetDoc.zeroPoint = [0,0];
    
    //Group everything on the active page of your SOURCE document:
    var myActivePage = app.layoutWindows[0].activePage;
    var myGroup = myActivePage.groups.add( myActivePage.pageItems.everyItem().getElements() );
    
    //Target the second document for the duplicate of the group:
    var myDuplicate = myGroup.duplicate(myTargetDoc.pages[0]);
    
    //Move the duplicate:
    myDuplicate.move([0,0]);
    
    //Tidy up a bit:
    myDuplicate.ungroup();
    myGroup.ungroup();
    

    Hope, that helps.

    Uwe

  • Series of beeps sounds coming from the laptop when windows starts... (connecting to the computer)?

    Ok... I recently bought a laptop that had some viruses... So, recently, I have completely swept away my laptop Sony VAIO (model name-VPCEH1AFX) and started from the factory settings. It seems to be back to normal, but he's doing a quick series will beep when I turn on the computer. Randomly, he makes noises in two quick beeps and beeps extended. It sometimes lasts a minute, but it can take up to 5 minutes at a time.

    The only difference with before reboot (that I have noticed so far) is... (1) I can't use the mouse to copy and paste... it is as if the mouse settings are pushed. (2) some games do not completely load right... as the option menus are able to be seen but not used. (3) on the beep. (4) it seems that I've lost a driver or something.

    I have read a few forums and studied the * outta this noise and have read that this could be the BIOS, or a harddrive out or something of this nature. I scanned everything I could think of to analyze and what she says goes and is up-to-date. I'm not an expert in computer science and REALLY need some (simple as possible) record... lol... I use this laptop for personal use and linked work use... Please help...

    Alright. You can try to control your system and see if it will produce freeze any error, momentary, or everything that happened around a minute before or after the sound signal will sound. Also, try to reset your BIOS to its default settings. Good luck.

  • In first items 14 scene selection from the Menu movie (Motion, holiday, Christmas frame) does not bind the scene 6 main Menu page. It places the scene 6 2 Menu scenes, but unrelated to the other, the main or scene selection Menu. What it

    How can I edit a movie Menu template? I use a Motion - celebrations and events - model of menu for Christmas related to 6 scene markers. Five scenes are represented by a thumbnail and name on 1 Menu scenes that appears when the button on the main menu page scene selection is reached. However, the scene 6, which has also a sticker and marker corresponding scene, is on another page (Menu 2 scenes) that does not link to the home page (does not appear in the scene selection Menu that has just 5 thumbnails and an arrow to return to the main Menu). In the area of work under the clip monitor Main Menu 1, Menu 1 and Menu 2 of scene scene appear together and by clicking on the thumbnail in the scene 2 menu the link to the clip 6 works except when Preview Disc is played, in which case the Menu 2 scene disappears. The scene marker is correctly linked, it just does not appear in the menus of the finish. The first five items of the Assembly (related to the scene selection menu) are all the video clips, but the 6th clip is a slide show. I read several threads on menus but found no mention that a slide show scene marker is treated differently by a menu template. Is it? The 5 first clips are all in the format AVI - DV with imported project files previously saved in this format, so that they could be related and engraved on a DVD. The slideshow is imported from PSE14 and 6 attached clips have already been burned successfully on disk (without menu) as a try-out. However, I was not satisfied with the resolution, then saved individually at the only other resolution DVD - SD576. Now I'm stuck at getting this sort menu. I operate 10 WIN. Any help will be accepted with gratitude.

    Hi, thanks for your response. I can rephrase the question very easily: why I've been so stupid? My problem was that I couldn't see a link in the menu between the Menu scenes 2 template and the main Menu. It turns out that the link was there all the time (a sideway arrow just above the main Menu link) but I thought he was part of the link from the main Menu and never clicked on it. When I burned my project to a disc and played on television, the sideway arrow was a different color and, of course, another link... the link I was looking for. Then, my apologies, problem solved, lesson learned - click on everything you see. Thank you. And I was very happy since the upgrade to 14 before except when it makes me feel stupid, which is frequently.

  • How to create a report based on the item selected from the list of selection?

    Hello

    I created a tables_LOV based on:

    Select table_name table_name user_tab_cols r, d

    where column_name like '% _type % '.

    Then I created a ListOfTables page element, display in a selection list and pointing to tables_LOV.

    I run the page, and I can choose the table I want in the drop-down list.

    How to create a report based on the selected element? (ex: select * from selected_table)

    Thanks in advance

    Salah

    Hi Salah,

    Allright, take a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report

    I think that simulates what you are trying to accomplish. I've implemented the simplest method I could think of.

    The report is based on a collection of apex. If you are not familiar with this, you should study the documentation: APEX_COLLECTION

    To recreate my example, you should:

    (1) create a report (interactive) on your collection

    SELECT *
       FROM APEX_collections
     WHERE collection_name = 'MY_COLLECTION'
    

    (2) create a selection list page_item for the tables that you want to display (in my case, this is called "P38_TABLES")

    (3) create a dynamic action that triggers on the evolution of your selection list page_item. Dynamic action must be a parade of PL/SQL procedure the following code:

    declare
      l_query varchar2(4000);
    begin
      l_query := 'select * from '||:P38_TABLES;
      if apex_collection.collection_exists
            ( p_collection_name => 'MY_COLLECTION' )
      then
        apex_collection.delete_collection
          ( p_collection_name => 'MY_COLLECTION' );
      end if;
    
      apex_collection.create_collection_from_query
        ( p_collection_name => 'MY_COLLECTION'
        , p_query           => l_query
        );
    end;
    

    Make sure that you add your page_item 'Page to send items' section.

    (4) add a real extra action that makes an update of the report area.

    Here are two photos describing the da:

    http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA1.PNG

    http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA2.PNG

    Good luck and greetings,

    Vincent

    http://vincentdeelen.blogspot.com

  • Create the table in select * from the other table

    DB: 11.2.0.2

    How to create a table with structure only not empty the data that we do not generally create table in select * from... But the command will pull the data also. How to create without data?

    create table foo
    in select * bar
    where 1 = 0

  • Notify the application that the Quit is selected from the dock icon menu

    I'm building Air application icon menu dock, is there a way for me to know if the 'Quit' from the context menu on the Dock icon is selected? I looked at the "closing" is not what I'm looking for as this is also sent when the user clicks the X button on the application.

    Thank you.

    The trick was to manage 'EXIT' event

    http://StackOverflow.com/questions/1338152/detecting-different-quit-options-in-air-applica tion on mac

  • Select from the drop-down list and populate a list in another menu drop down

    I have a drop down list with 10 items in the list. If possible, would like for a selection in the drop-down list to populate a drop-down list with another list of selections. Each of the 10 points in the first list each will have a list of different options in the second drop-down list. I don't know how to build this solution.

    Thank you

    MDawn

    Hello

    It was because of the clear rawValue script that I put in the output from the drop-down list event businessFunction.

    I fixed it:

    // clear the current selection in the department dropdown
    dept0.rawValue = null;
    dept0.execEvent("exit");
    

    https://Acrobat.com/#d=MrWYQbTZIR7xJQDlm5ZSLg

    Good luck

    Niall

  • How to move the selection from the magic wand of 2 pixels tool to take off the edges?

    Hello

    I am trying to make a selection with the magic wand tool and move the edges of the selection by a pixel or two, but the button "refine edge" does not seem to do anything.  I want to cut a pixel on the edge of an image that I cut into another image.  Any help would be great thanks.

    Depending on whether you have selected the image or the background, use Select > modify > expand your selection or select > modify > contract selection

  • Enable / disable fields by selecting from the list

    Hey guys,.

    How can I make an option like < bool > with a list instead of a checkbox.

    Example of work in text QooQees Widget magic. I already asked this developer but got no answer.

    This selection in the list turns off the text field:

    Bildschirmfoto 2014-08-21 um 16.09.59.png

    And if you choose another option that it activates the text field:

    Bildschirmfoto 2014-08-21 um 16.10.10.png

    No idea how to do this?

    Unfortunately, it seems that it is a hole in the documentation, but the tag in lists also support the disableOptions attribute, similar to the way in which the tag of under the made. You can see an example in the section for its operation.

  • SELECT from the table during a TRUNCATION operation...

    Nice day

    Environment: Oracle 10 g 2 EE on AIX and Crystal Reports/Crystal Enterprise (XI 3.1)

    We have a table that is refreshed every 10 minutes throughout the day and night. Users run reports against the table pretty well any time they want. The table is updated through OWB by using the TRUNCATE/INSERT that first truncates the table and then reloads the entire table.

    Opportunities random when the user runs the report at the same time as the update of the table, the user gets an error message from Crystal as follows:

    Error in the file ~ tmp23206abf4faed20.rpt: impossible to extract the data from the database. Details: [database vendor Code: 8103]

    In other cases, which is the one that I expect, the user sees a report empty and all simply of runs again the report. The report only takes a few seconds.

    This error could be due to the Crystal report trying to get the data in the table at the EXACT time that the table is truncated?

    Other thoughts are welcome!

    Thank you very much!

    -gary

    Hi Gary,.

    This behavior is described in MOS 170185.1

    Concerning
    Peter

  • Select from the table where the last character of the string is numeric

    Hello
    I have a table of STREETS with a field called ADDRESS. I want to select all the records in streets where the last character in the address is a number.
    Select ADDRESS of STREETS where regexp_like (substr (address,?,?,), '[0-9]');
    --? means that I don't know what to put here!

    I don't know if substr is the best approach to do this, because I want only the last character and the records are of different lengths.

    Thank you!

    Hello

    If you want to use regular expressions:

    WHERE     REGEXP_LIKE ( address
                  , '[0-9]$'
                  )
    

    You can get the same results, no doubt more effectively, without regular expressions:

    WHERE     INSTR ( '0123456789'
               , SUBSTR (address, -1)
               )     > 0
    

Maybe you are looking for