Is there a way to fill the boss way recursive/dynamically in oracle 10g

Hello

I want to complete the following template and then use the result as a virtual table in oracle 10g.

SELECT 2 FROM DUAL;

UNION ALL

4. SELECT FROM DUAL;

ALL UNIONL

8. SELECT FROM DUAL;

.

.

.

.

UNION ALL

. SELECT POWER (2.61) FROM DUAL;

Is it possible that I can use the recursion or dynamic query with "with clause" and avoid writing all these statements.

Thank you

YG

Hi GY,.

In 10g, you can use a clause of the TYPE:

SELECT nbr

OF THE DOUBLE

MODEL

DIMENSION (2 d)

MEASURES (number 0)

RULES ITERATE (61)

(nbr [ITERATION_NUMBER] = power (2, ITERATION_NUMBER + 1))

ORDER BY nbr;

From 11 g 2, you can use a WITH recursive clause:

WITH v (n, lvl) AS (SELECT 2 n, 1 lvl FROM DUAL

UNION ALL

SELECT 2 * n, 1 + lvl

V

WHERE the lvl<=>

)

Select n v

Tags: Database

Similar Questions

  • Is there a way to dynamically determine the number of parameters to a procedure side Server?

    Hello

    This is a helper method used to call a server-side function that traverses the bindVars parameter to fill the PARAMETERS of the function. Is there a way to dynamically determine the parameters input/output based on the procedure name in the stmt parameter? No member of the CallableStatement class looked promising, but the getParameterMetaData() in the PreparedStatement class method seemed it might be useful lead. However, I have not found any (yet) a detailed description of how to use it.

    protected Object callStoredFunction (int sqlReturnType, String stmt,

    Object [] bindVars) {}

    CallableStatement st = null;

    try {}

    // 1. Create a JDBC CallabledStatement

    St = getDBTransaction () .createCallableStatement)

    ("" start?: = '+stmt+ ";" end; ", 0);

    // 2. Register for the first variable binding for the return value

    st.registerOutParameter (1, sqlReturnType);

    If (bindVars! = null) {}

    // 3. Loop on values for the bind variables passed, if any

    for (int z = 0; z < bindVars.length; z ++) {}

    // 4. Set the value of vars binding provided by the user in the stmt

    st.setObject (z + 2, bindVars [z]);

    }

    }

    // 5. Set the value of vars binding provided by the user in the stmt

    st.executeUpdate ();

    // 6. Returns the value of the first variable binding

    Return st.getObject (1);

    }

    catch (SQLException e) {}

    throw new Aexception.getLocalizedMessage (e);

    }

    {Finally

    If (st! = null) {}

    try {}

    // 7. Close statement

    St.Close ();

    }

    catch (SQLException e) {}

    }

    }

    }

    James

    PreparedStatement.getParameterMetaData () subject is exactly what you need for this task.

    Once you have the ParameterMetaData you can ask how many parameters are present, and how they are. Parameters are numbered from 1 to n, and you can use ParameterMetaData.getParameterMode (1); to get the function of parameter 1. The modes are defined as static values of the ParameterMetaData object. Check out the doc at http://docs.oracle.com/javase/7/docs/api/java/sql/ParameterMetaData.html

    Timo

  • Is there a way to dynamically calculate the values for the IN operator?

    I want to know if there is a way to dynamically calculate the criteria to include within an IN operator in the WHERE clause. "For example when I try to run the following I get an Oracle error message ' OR!-01722: invalid number." The script below is just an example to help illistrate the problem, I don't want to hardcode the values assigned to the v_test directly within the IN operator because the values of v_test will change from user to user.

    DECLARE

    v_test VARCHAR2 (10): = '1,15,25,55';
    v_tmp VARCHAR2 (50): = NULL;

    BEGIN
    SELECT d.metric_title IN the tbl_health_metric_definition v_tmp d
    WHERE d.metric_status = 'Active' AND d.metric_id IN (v_test);
    END;

    You can convert the string "1,15,25,55" online like this

    SQL> select regexp_substr('1,15,25,55' ,'[^,]+', 1, level) list
      2    from dual
      3  connect by level <= NVL( LENGTH( REGEXP_REPLACE( '1,15,25,55' , '[^,]+', NULL ) ), 0 ) + 1
      4  /
    
    LIST
    ----------
    1
    15
    25
    55
    

    and use this selection in your IN clause.

  • Fill the combo box list dynamically

    I have a drop-down list box that is filled from a cluster table which is unbundled element with that I want to fill the drop-down list box. There are several types with the same element such as

    1-60mm

    1-60mm

    1-60mm

    1-60mm

    3-60mm

    3-60mm

    What I want to do is just see one 1-60mm and a 3-60 mm and when selected will get the value of the index view with thos types only in a table?


  • Guyz I need to convert the database from ms access to oracle 10g

    Hello everyone... I wanan convert my access database to oracle 10g. As I create a form like OVERVIEW MONTHLY after the transfer to oracle 10 g... I wud really cud happy if a few b help me in this matter...
    I'm ready to send database... access to u people can check it out and get back to me with a useful solution!

    Hello

    Oracle SQL Developer migration

    Oracle SQL Developer integrates migration support, offering users the opportunity to migrate objects from database and data from MySQL, Microsoft Access and Microsoft SQL Server, Sybase to Oracle. This document details the installation steps to help prepare your environment for migration of database and provides a brief description of each of the 5 main steps of a migration.

    http://www.Oracle.com/technology/tech/Migration/Workbench/files/omwb_getstarted.html

    Concerning

  • Where to place the folder forms and reports for oracle 10g on Linux server

    Hello...

    Currently, iam has a migration to oracle 10g module.
    All my modules which consists of form and report files are inside a
    folder named PROJECT and placed in C:\ in windows server.
    So when I want to call a form or a report I used the path as "C:\PROJECT\module_name\form_name.fmx."
    My client now wants her project to be used in the LINUX-based server.

    Now, I want to know where I should put my form project file and file reports
    and how I should call them...

    Thanks in advance

    Can you say how can I call reports as u said hardcode the path when the report is not a good practice.

    I agree with Dhiraj Madan, paths of coding is a very bad idea, your application has become non-portable.

    For FORMS_PATH, you can use default.env, as already said (or .env, if applicable).

    The same can be done for REPORTS_PATH, using the reports.sh script, in $ORACLE_HOME/bin.

  • Is there a way to dynamically determine the SSO API vCenter server info / PowerCLI?

    Just started looking into this, but the idea is that SSO/PSC on its own virtual machine while vCenters and Web client are on separate virtual machines.

    Is it possible to see which server SSO/PSC vCenters associated to?  I want above all this information, so I can record a daily SSO/PSC situation where there problems that prevent me from logging into vCenter.

    Addedalanrenouf and LucD for attention.

    Working specifically 5.5.

    Post edited by: Chris Nakagaki

    Figured this out.

    Basically, it's this:

    ($Global: DefaultVIServer |) Get-AdvancedSetting | WHERE-object {$_Name - match "config.vpxd.sso.admin.uri"}) .value

    If you are a connected to more than one via the cmdlet Connect-VIServer vCenter, so it is going to be slightly different.

  • Is there a document that fills the API references from upstream?

    I inherited a script upstream that I need to convert to the system 11.1.1.3. Is there a document there that will help you bridge the gap? For example, what would be the equivalent of that? :

    If not objHW.DataManipulation.PblnResult then

    There is a guide API available on the Oracle Technology Network. There is not a document that however of bridges between the two APIs.

  • I have a VBA application that fills the data in an Acrobat form.  Do I have to distribute a complete Acrobat on each machine that uses this application (it will be disastrous) or is there a way I can use the software Acrobat reader only.  I am using the f

    I have a VBA application that fills the data in an Acrobat form.  Do I have to distribute a complete Acrobat on each machine that uses this application (it will be disastrous) or is there a way I can use the software Acrobat reader only.  I use the next AcroExch.App and AcroExch.PDDoc object to the form.  I hope there's a distribution object, I can use the full application and not because I don't want users to have access to forms and to keep the cost down.

    It is important to realize that the Acrobat SDK kit is a marketing tool for Acrobat. So, Yes, certainly you need a copy for each system. There is no redistributable components.

  • Is there a way to connect to the Adobe application fill &amp; sign DC to an Adobe Document Cloud account?

    I started to fill out a form on the web in Adobe Acrobat, but I noticed he was saved automatically and I wanted to finish it on my phone. I tried to find the same form on the Adobe application fill & sign, but I couldn't find it.

    Is there a way to connect my Adobe application fill & DC sign to my document cloud account?

    Google Chrome (Windows 8)

    5.0.2 Android

    For Android currently the answer is 'no', but look at the ability to 'connect' in a next version.

    App to fill & sign for iOS supports signing in with your Adobe ID, in which case you can access all of your forms in the Document cloud.

    The Android app is a little behind the iOS app and the ability to sign should be soon but I can't say when exactly, but this is the function to look out for...

    Thank you

    Josh

  • When you use the "Fill &amp; sign PDF" feature, is there a way to stretch to resize the text box, to an area of the page... rather than through a long straight line...?

    When you use the "Fill & sign PDF" feature, is there a way to stretch to resize the text box on a specific area of the page... instead of the text box is in a long straight line...? I do not see there is an option or the ability to do so, just want to confirm.

    Improving the management of multiple line text fields is in our plans, but for now, you need to add manual carriage return (Enter).

    Thank you

    Josh

  • Is there a way to remove the segment lines from a polar grid (filled using livepaint) without join them using pathfinder (which makes it a pain should future changes it will take)?

    I use the polar grid tool to do the graphics in 'ring', but we need to develop and then join segments of same color using the pathfinder before using them in PDF files and images (and not printed, which is fine) to avoid the original grid lines are visible. Is there a way to avoid these lines which display without doing this, because if a change is made then to the table, it's a pain to redo once the segments were joined?

    Example below - the yellow area has not been reached; others have.

    Example.jpg

    I'm so sorry. Should not publish before the first coffee.

    It is a problem of anti-aliasing.

    What you can do when you export raster formats:

    -Do not extend the vectorization.

    -When optimized for 'work' antialiasing method defined export type not "optimized".

    If this does not work: try and apply the pixelation effect and set the resolution on everything that you need to export.

  • Is there a way to remove fields to fill without deleting the form data?

    Is there a w to delete the fields to complete Adobe Acrobat XI? He currently presents itself as a green bar on top of a PDF file. I ask this becausse when uploaded to a site FTP form all data are lost when the client downloads the file.

    You try to print to the pdf printer. In the Pro version, there is an option to flatten, but it is not available as Standard.

  • Publication in FCPX settings... IS THERE A WAY TO MAKE EDITING THE PARAMETERS EASIER TO HAVE FCP TO PUBLISH EACH SCHOOL SETTING? IS THERE A WAY TO "PUBLISHED IN THE WORLD" A WHOLE PROJECT OR AT LEAST PARAMETERS?

    IS THERE A WAY TO MAKE EDITING THE PARAMETERS EASIER TO HAVE FCP TO PUBLISH EACH SCHOOL SETTING?

    IS THERE A WAY TO "PUBLISHED IN THE WORLD" A WHOLE PROJECT OR AT LEAST PARAMETERS?

    Is it wise to publish all THE settings of a plugin?

    I prefer to reduce the options, for example I'm rigging 'size' to distribute only one of them-in my eyes - range 'useful '; or create by rigging the drop-down menu 'plans', for example for the color selections...

    In any case...

    'Major settings' as Transform or filling or 3D can be published, just click Reset arrow, and all the "sub menu" get published too... can't imagine how to make the publication easier...

    BTW: CAPS means YELLING on the boards...

    be nice... what goes around, comes around ...

  • Is there a way to determine the representation of a digital control through the property?

    All,

    It is perhaps a silly question.  Is there a way to determine the representation of a digital control of its reference?  For example, U8 vs DBL. I want to fill in the data of a file to a vi and then run it.  I can't seam to find the property that I need.

    Thank you

    Rich

    Hi rich,

    You should find this property where all others are found

Maybe you are looking for

  • Should I update my Bios?

    I have an old DV6707us.  I bought a new computer and when it failed, I took my old laptop and replace the hard drive has failed. The original system is Windows Vista.  A couple of months he has reformatted the new hard drive and installed Win7. My qu

  • missing system font?

    So, that's what I get when I opened om my mac numbers: I did a spotlight search, I searched the library system with the finder, and I had a wide glance in my font book. No such font appears anywhere. So I drop ▹ restore fonts... such Standard as advi

  • How can I remove old apps from my phone?

    In the app store is a list of all former applications, I deleted from the face of my phone and updates, I did. Is it possible to remove these and clean up this list?

  • Touchpad does not work under Vista - Satellite A110

    I installed Win Vista business on Satellite A110...I downloaded the alps touchpad drivers: the drivers are installed, but it does not work!Is this a known issue? I did something wrong?Thank you

  • Xoom compass

    Anyone else have problems with the compass of the Xoom? Most of the I downloaded the applications that use it have the compass off the coast of 90 degrees (this may be because the standard Xoom orientation is landscape and phones are portrait). I hop