connect by - generate list with interval

Hi all

I'm migrating to a package in SQL Server 2005 to Oracle 11 g.

Please help me to recreate the list generation.

Here's my code for SQL Server:

with lines like

(SELECT 1 AS rowid, 1 AS rowbeg, 6 AS name

Union of all the

Select the rowid + 1, rowbeg + 6, name + 6 lines where rowid < 10)

Select * from lines

And the result is:

116
2712
31318
41924
52530
63136
73742
84348
94954
105560

How can I do the same thing in Oracle 11 g?

Thanks in advance.

Hello

If Oracle 11.2 and upward (but not 11.1) you can use a WITH recursive like this clause:

WITH all_rows (Clotilde, rowbeg, name) AS

(

SELECT 1 AS Clotilde - you don't need here, the alias column

, 1 AS rowbeg - but I think that they help make things clear

6 AS name

OF the double

UNION ALL

SELECT Clotilde + 1 - you can put aliases for column here, too

rowbeg + 6

name + 6

OF ALL_rows

RowN WHERE<>

)

SELECT *.

Of all_rows

ORDER BY Clotilde

;

There is no version 11f or 11: 00 in Oracle, it is ridiculous to say that you have 11g.  When you give your version, give the full version, for example 11.2.0.3.0.

As you can see, CONNECT BY requires less coding, and once you get used to CONNECT BY, it is easier to understand, debug and maintain.  Again, CONNECT BY is probably more effective, but only 10 lines, you would never notice the difference.

Tags: Database

Similar Questions

  • How to connect a Toshiba TL838 with facebook profile?

    How to connect a Toshiba TL838 with facebook profile?
    When I try to connect toshiba generate email with info and links for connect facebook with toshiba accounts places but when I click on the links I see only errors.

    _ * EDIT * _

    * Ok I flashed the QR code with my phone and now is connect :) *.

    Moderators please close thead

    Post edited by: junioreks

    > Ok I have flashed the QR code with my phone and connect now :)

    Thanks for sharing!

  • List of connections of Console Active with PowerCLI

    Does anyone know of a way to check the number of connections to the active console to a virtual machine using PowerCLI?  I know that it is possible for the list connection events that have taken place in the past, but is it possible to check the current status of connections?  I wrote a Powershell script to launch a console connection to a virtual machine remotely but would if ensure that there is no active connection already open on the selected virtual machine.  I already put the value of RemoteDisplay.MaxConnections = 1 in the VMX files to limit active connections to one.  Thanks in advance for any help.

    Hello-

    I don't know, a list with information about active connections, but there is at least one property that keeps the _count_ of active connections.  The property 'Runtime.NumMksConnections' of the View of a VM object .net held this indictment:

    PS C:\> Get-VM myVM | Get-View -Property Name,Runtime.NumMksConnections | select Name,@{n="NumConn"; e={$_.Runtime.NumMksConnections}}
    Name       NumConn
    ----       -------
    myVM       1
    

    So, you can check out this charge, pmassey, and if it is '-eq 0 ", then launch the connection...

  • HP 8600 Pro Premium: 8600 Pro Premium connected to the cable network shows as not connected on the list of devices

    My printer/Premium Pro 8600 is wire connected to my network and works very well (exception below) but shows as not connected on the list of devices on my desktop computer Win 10.  What gives?  Private network.

    I also can not connect to my laptop which is connected wireless to the network.

    Hello and welcome to the community of HP @Pickles2011,

    I understand that you are having problems with your HP Officejet Pro 8600 Premium connection. I'll be happy to help you.

    Here are some links to documents that provide solutions for troubleshooting connection problems. Try the steps and let me know the results.

    HP printers - Printer not found during setup of the network (Windows) driver

    Wireless printing Center - Troubleshooting

    If it helps, will testify of my answer by pressing the 'thumbs up' below, or click on the button "Accept as Solution" if I helped you reach a solution.

    I hope this helps and have a nice day.

  • Unable to connect to the internet with other programs (like Zune) but internet explore still connects.

    I can connect to the internet with internet explore very well. No problems.  But when I try to connect another program to the internet, like Zune or Wildtangent games the program says that I'm not online.  I know that I'm online because I check to make sure you Internet explore, and which still works.  I already tried to change the firewall settings to allow programs through, but that did not work either

    Hi Chloe,.

    1. What is the exact error message?
    2. Since when are you facing this problem?

    However, try the following steps.

    Step 1: Add zune except for windows firewall.

    1. click on start toreduce this includes this image, type firewall.cpl in the Search box and press ENTER.

    2. click allow a program through Windows Firewall. Collapse this includes this image
    If you are prompted for an administrator password or a confirmation, type the password, or click continue.

    3. click on add program.

    4. click on Browse.

    5 locate the Zune and then click Open.
    Note By default, the Zune is installed in the following location:
    C:\Program Files\Zune\

    6. click OK twice.

    Step 2: Windows live onecare

    1. Start Windows Live Onecare.
    2. Click change Onecare settings.
    3. Click the firewall tab.
    4. Click on Advanced settings.
    5. Scroll through the list of programs to determine if Zune appears in the list.

    ·         If Zune appears, make sure that the Zune is set to allow instead of block.

    ·         If Zune does not appear, follow these steps:

    1. click on Add.

    2. Locate the Zune and then click Open.

                    Note By default, the Zune is installed at the following location: C:\Program Files\Zune\

    3. click OK twice.

    http://support.Microsoft.com/kb/927980

    Try these steps and let us know the result.

    Bindu S - Microsoft Support
    Visit our Microsoft answers feedback Forum and let us know what you think

  • My ZTE open C unable to connect to the wlan with 63-signs-hex key.

    Hello

    my C open from ZTE unable to connect to the wlan with WPA2-PSK and a 63 sign hex key. When I create a 2. ESSID with WPA2-PSK a sentence normal, everything's fine.

    Oliver

    Hi OliverwithZTE,

    I understand that you have connection problems to your network WPA2-PSK.

    Unfortunately, WPA2-PSK is currently not supported on Firefox OS version 1.3. Only WPA-TKIP and WPA2-AES are supported.

    -Ralph

  • Unable to connect to the internet with Foxfire. Can do with Internet Exporer

    I've been using Foxfire. After an update I can no longer connect to the internet with Foxfire. IE can connect.

    Firefox is the name. Foxfire is a bio-luminescent fungus.

    http://en.Wikipedia.org/wiki/Foxfire _ (bioluminescence)

    See this support article - difficulty of problems connecting to websites after Firefox update

  • Satellite A500 - 15 M: unable to connect to the TV with HDMI

    Hello

    I have a Satellite A500 - 15M. I recently tried to connect to my TV so I could watch certain shows online on my Hannspree Xv HD ready TV.
    The HDMI out does any record on the TV - the TV displays a message "not supported" and remains off (as if there is no signal) - display settings on the PC it does not recognize the TV... actually it [Intel Graphics and Media Control Panel] indicates that the TV/monitor settings are not supported.

    But I can connect via the VGA output - although I have to delete the display settings to 1024 x 768 to show on TV. In addition the display on the TV then is mainly pink and red, even if my pc display peak is most often blue. -start of the Toshiba screen displays on the TV, without any problems and one or twice the login screen was displayed too much, but then sometimes it isn't...
    I know that's not the VGA cable as I can connect to the TV with it on netbook advent my wife without any problem.
    Are there drivers, I need to update / download? Or I need to change the settings?
    How can I get my screen on my TV?

    Any help would be greatly appreciated. Thank you

    Hello

    First, you must connect the two machines (laptop and TV via HDMI) when the two devices are turned off. After turn on the TV and the laptop.

    You must choose the HDMI on TV channel and should then use the FN + F5 key combination to switch the video output to the TV.

    If this does not help, try updating the graphics card driver.
    It seems that your laptop supports the Intel graphics chip. Therefore, you can see the Intel page for new drivers.

    Welcome them

  • Creating a smart list with "remarks".

    Hello everyone, I want to create a smart list with titles that have added only remarks. Howevre there is no option as "remarks" are "true." Anyone with any suggestions?

    Thank you!

    All of the rules:

    Remarks is not < empty >

    Playlist is music

    TT2

  • Tecra M3 has ceased to connect to the internet with cable

    I have an old laptop Tecra of 3 year (out of warranty).
    Last week, he stopped to connect to the internet with a cable. I tried several cables and jacks. No idea what to do?

    LAN card is entered correctly in the Device Manager?
    LAN port has two leds, green and orange. Green LED is turned on when you connect the LAN cable?

  • Can I connect an iPad pro with a mouse logitech M535?

    Can I connect an iPad pro with a mouse logitech M535?

    N °

    NO mouse will work on iOS and Apple iDevices.

    There is no pointer/cursor physical programmed in iOS for the mouse navigate on the screen.

    Your fingers are your the mouse input device.

    iOS has an 'I' slider which can now controlled insertion point by invoking the keyboard of the iOS of beam software and then do a single tap with two fingers to tirn software keyboard together area in a giant trackpad.

    If you useb double two fingers type in keyboard area, you can put it into words, lines of text or paragraphs for editing.

  • I am trying to connect a Macbook Pro with Retina display for a new monitor Dell Ultrasharp 3014. I tried to connect via HDMI and DVI cable supplied with the monitor but the monitor says "no cable dvi - d".

    How to connect a Macbook Pro with the (just bought) Retina display for a Dell Ultrasharp U3014's new? I tried to connect with HDMI and DVI cable supplied with the monitor but the monitor says "no dvi - d" cable. I never tried to do that before so I'm lost.

    Use a mini-displayport cable. Connect to one of the ports Thunderbolt the MacBook Pro to ultra-compact monitor entry.

  • The Apple Magic Keyboard can operate without bluetooth when connected to an iPad with the lightning to the USB camera adapter?

    The Apple Magic Keyboard can operate without bluetooth when connected to an iPad with the lightning to the USB camera adapter?

    I love the Apple Magic Keyboard to be very light (I want it with me everywhere). I also like that I can choose the layout of the keyboard I want (Canadian multilingual), which is not available on any keyboard for any brand, with the exception of Apple iPad (and I did a ton of research). I have problems with the old model of keyboard Apple Wireless because of the Bluetooth connection: I often have trouble connecting. I want a reliable keyboard. I don't like having to plug the keyboard on the iPad, and I think that a wired keyboard can more reliable and safer than a wireless keyboard. And a wired keyboard never had battery problems.

    I read that the Apple Magic Keyboard can work wired with a Mac without bluetooth. And I read that some USB keyboards work with lightning to the USB camera adapter. There are several keyboards with a cable (Belkin or Logitech) lightning, but none with the available Canadian multilingual.

    So, if I buy a magical keyboard Apple and a Flash to the USB adapter of the camera, according to my needs, I'll be satisfied or I'm going to be disappointed?

    A better solution would be to have a male-male cable lightning between the keyboard and the iPad, but I don't find any of these products anywhere.

    Thank you.

    It will not work. And where did you read that the keyboard works wired with a Mac?

  • connect labveiw 8.2 with nor pci-6251

    I have no pci-6251 and its cd driver with labview 8. How can I connect the daq with labview 8.2 and run programs

    Hello

    I can't download the driver of NOR-DAQmx 8.7.1, connect labview 8.2 with NOR-DAQmx PCI-6251...

    Why?

    Please answer...

  • I put my cRIO 'DHCP' to 'local connection' and lost contact with her.

    I put my cRIO 'DHCP' to 'local connection' and lost contact with her.

    I changed the location setting labelled '2' to post a link-local only, so I think I hit save to '3 '.  So, I have had no contact with my cRIO network.

    I tried;

    Hit the reset button

    A MAX of opening closure

    Go to safe mode

    Lift the switch to reset IP

    Power cycling the cRIO

    Directly from the host to my target of cat 5 cable running

    None of it worked, and I have no contact with my cRIO.

    This is what MAX looks like now.  How can I fix?

    It turns out that I had more of a problem.  Corrupt drivers, 255 in many in my subnet mask, overly complex LAN, use server control... you get the idea.  So I just deleted all software, disassembled everything and more from scratch.  Now back to the top and work.

    Thanks for the tips everyone, all the pieces and peace where it is useful to help me see the bigger picture.

Maybe you are looking for