Specify the command cursor displays the results.

I want to use a cursor, to treat some DML statements for a number of tables.

During the process, I need to insert records in the parent table before the children tables.

Is it possible to dictate the order that a cursor returns its results.

For example if I had a number of named tables A, B and C.


Could I get a cursor to return them in the order C, A and B.

Thank you
Ben
order by decode(object_name,'TABLE_C',1,'TABLE_A',2, 'TABLE_B',3)

Tags: Database

Similar Questions

  • Executing a system command and to display the results in the material master

    I need to change and existing TestStand application. I need the string that is returned when you type 'set computername' from a cmd prompt and show the result above all test reports. Would it be a step type call executable? And how I would get it in StationGlobal.computerName? Finally, how can I make it appear at the top of the test report?

    Sorry to ask so many questions from beginner but it was the trial during the test.

    Thank you

    Amherst

    If you have LabVIEW, you can call the following (VI attached), to get the computer name.  It uses the Exec System to access the CMD prompt.

    Take a look at the VI and see if you can use it for any other command 'Set', that you may need.

    Thank you

    PH

  • Is there a way to specify the static IP address for deployment EGGS in the ovftool command?

    Hello

    I'm trying to deploy EGGS using ovftool. I see the option - network and - net available for the selection of the network by name, although I wasn't able to find a way to assign a static IP address in the ovftool command itself. Something like - ip0 = 10.10.10.10. Is there a way we can do that? User interface when we deploy an OVA, we have available to provide IP address, gateway, DNS and network mask.

    Thank you

    Hello, vPupil-

    If the ovf/eggs is created to have definable properties, as an IP of the machine, you can use the "-prop ' parameter to ovftool.exe.

    By literature ( http://www.vmware.com/support/developer/ovf/ovf20/ovftool_201_userguide.pdf), is the syntax to set a property:

    --prop:

    It is near the bottom of page 24, as well as an example.

    To see if the ovf/eggs that you are using has configurable options, you can use ovftool.exe in mode "probe" (page 25).  Just issue the command with only one source, no target, as such:

    > ovftool.exe myAppliance.ovf
    

    This should generate the results of the probe, which should list all configurable properties, including their 'key '.  This key is what you use with the "-prop" parameter.  In the example of probe on pages 25-26, the FVO has two properties, 'db - ip' and 'ws - ip ".  Then you should be able to specify values for these properties by adding the following to your ovftool order:

    ... --prop:db-ip=10.10.10.10 --prop:ws-ip=10.10.10.11 ...
    

    How does do for you?

  • How to display the result sqlplus in java?

    I want to call sqlplus to run some commands sql in java, but how can I print the result of sqlplus?

    In java code, I call sqlplus as:

    Process of p;
    Run the command
    p = Runtime.getRuntime () .exec (commandString);
    print the result of the command
    InputStream inputStream = p.getInputStream ();

    How to display the result of the execution?

    Published by: Yi on February 26, 2012 23:41

    You can use ProcessBuilder. Copy the following code starts sql * more and runs the script in the variable "filename". It displays the results in the console of NetBeans.

    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.File;
    import java.util.Map;
    
    public class test1 {
    
        public static void main (String args []) {
    
            test_script();
        }
    
        public static void test_script () {
    
            String fileName = "@test_table.sql";
            String sqlPath = "E:\\";
    
            String sqlCmd = "sqlplus";
    
            String arg1   = "user/password@sid"; -- plug in your user, password and db name
            String arg2   = fileName;
            try {
                String line;
                ProcessBuilder pb = new ProcessBuilder(sqlCmd, arg1, arg2);
                Map env = pb.environment();
                env.put("VAR1", arg1);
                env.put("VAR2", arg2);
                pb.directory(new File(sqlPath));
                pb.redirectErrorStream(true);
                Process p = pb.start();
              BufferedReader bri = new BufferedReader
                (new InputStreamReader(p.getInputStream()));
              BufferedReader bre = new BufferedReader
                (new InputStreamReader(p.getErrorStream()));
              while ((line = bri.readLine()) != null) {
                System.out.println(line);
              }
              bri.close();
              while ((line = bre.readLine()) != null) {
                System.out.println(line);
              }
              bre.close();
              System.out.println("Done.");
            }
            catch (Exception err) {
              err.printStackTrace();
            }
    
        }
    
    }
    

    Here is the content of the script at E:\\test_table.sql

    Prompt drop TABLE ANOTHER_TEST;
    DROP TABLE ANOTHER_TEST CASCADE CONSTRAINTS
    /
    
    Prompt Table ANOTHER_TEST;
    CREATE TABLE ANOTHER_TEST
    (
      BATCH_SEQ             NUMBER,
      BATCH_GROUP_ID        NUMBER,
      STATUS_FLAG           VARCHAR2(30 BYTE),
      OBJ_BEING_PROCESSED   VARCHAR2(80 BYTE),
      BATCH_RUN_START_DTTM  DATE,
      BATCH_RUN_END_DTTM    DATE,
      CREATE_DTTM           DATE,
      CREATE_USER           VARCHAR2(30 BYTE),
      UPDATE_DTTM           DATE,
      UPDATE_USER           VARCHAR2(30 BYTE)
    )
    LOGGING
    NOCOMPRESS
    NOCACHE
    PARALLEL ( DEGREE DEFAULT INSTANCES DEFAULT )
    MONITORING
    /
    
    COMMENT ON TABLE ANOTHER_TEST IS 'This is a test table.'
    /
    
    EXIT
    /
    
  • OBIEE answers I want to change the Result (The specified criteria) No.

    Hello
    Greetings!


    After the creation of the report for the previous year I get no data is a correct result... instead of give the underside of thing I want to give my own personalized information... How to give that...

    pls help me...

    No results
    All data is not cause to the specified criteria. This is often caused by the application of filters that are too restrictive or contain incorrect values. Please check your filters to ask and try again. The currently applied filters are listed below.


    Book type is equal to AA, BA
    and BU Code related entities (MCRP05) is equal to FDC
    and AB exercise (AAAA) is equal to 2009
    and BU product Seg Code (MCRP08) is equal to FD
    Unit type Bus equals 08, 09, 10, 11, 14, 59


    Kind regards
    Mohan

    Hello

    Add N implies (another view-> No. results) in your layout from Mateur and change the display of Results number and enter your information in the text box.

    Thank you
    Oldia...

    For more information-

    http://bischool.WordPress.com/category/no-results/

    Courtesy of Kishore.

    Thank you
    Oldia...

  • Display of the results of query in Excel on the Web

    Hello

    I try to display data from a query in excel on the web without creating an existing file. I know I can create a CSV using UTL_FILE and post it but I was hoping there was a way to do it without actually creating the file. I have a procedure that resembles

    PROCEDURE displayAsCSV is
    cursor STUD_CURS is
    Select * from students;

    BEGIN
    for STUD_REC loop STUD_CURS
    HTP. Print (' "' |") STUD_REC. FIRST_NAME. » " , " '|| STUD_REC. LAST_NAME. » " ');
    end loop;
    END;

    Anyone know if it is possible to display these results in excel in the browser by altering the MIME types or something similar?

    Thank you

    Check Tom owa_sylk utility with the appropriate mime type.

  • Why the result of the SQL query is not displayed in the HTML text box?

    Hello

    Under query result appears in home > workshop SQL > SQL commands.

    Select t.nom
    of pm_task t
    where: P5_Project_id = t.project_id
    and: P5_task_id = t.id

    But when the same code is run through EditRegion of HTML text box > region definition > sources > Source region, the result is not displayed.
    Why is this so, and what is the solution?

    Thank you
    Guy

    You need a report from the region for this ;) A region of HTML is to display a static text or page items.

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • How can I specify the number of displayed decimals?

    I displays a numeric value in a text field in a window by using this code to cocoa:

    [number_First setDoubleValue:number_f];

    It works fine, but I want to specify the number of decimals displayed.  Is there an attribute format that I can use for this?

    I don't know if it's the best way, but I create a temporary string like this:

    [number_first setTextValue: [NSString stringWithFormat: @"%6.2f", Number_f]];

  • To display the result in the dialog box

    Hi all!

    I wonder if there is a way to make me at the end of a process, to display the result (number or string), I got in a dialog box.

    I mean at the end there is a dialog box containing the message as "the result is xxx" xxx is the result of this process.

    Any idea about it? Thanks in advance!

    Chao

  • How to make a loop to display the results of each iteration?

    I have a process inside a for loop and I want to display the results of 1, 2, 3 and 4 iterations all at once. Is it possible to do without creating 4 distinct for loops with a different constant for every N?

    Thanks for the help.


  • Is there a way to divide such ads and Add ons in a screen and automatically display search results in the other

    Original title: twomonitorsononepc

    I have two monitors on my pc is there any way for example divide ads and Add ons in a screen and automatically display search results in the other.

    or if facebook were used cat into one screen and status on the other screen please

    Hi Richard,

    What is the operating system installed on the computer?

    It seems that you need to divide the same application in several windows and place them in different monitors. Is this correct?

    Unfortunately, it is normal and you can not split the same application on two different monitors.

    Hope this information helps. Get back to us if you have more queries about Windows.

  • BlackBerry Smartphones ALT/O command to display the messages does not work on 7.10; Anyone know another shortcut?

    ALT/O command to display the messages does not work on 7.10; Anyone know another shortcut?  I know that I can get all messages sent via Options, but too heavy to do it and then cancel it.

    do an advanced search using the options. Once you are satisfied with it, you can save it and assign it to Alt - O.
    If you do this, remember to remove any other shortcut search which may exist.

  • Unable to display the results of a detailed report or the results of a questionnaire which is inbedded in the project.  I checked the preferences of quiz and enabled for the draft declaration.  I use SCORM 1.2.  My LMS is not listed (MCN) and so I chose '

    Unable to display the results of a detailed report or the results of a questionnaire in a bed within the project.  I checked the preferences of quiz and enabled for the draft declaration.  I use SCORM 1.2.  My LMS is not listed (MCN) and so I chose 'other LMS standard.  Any ideas on why I see the results?

    Publish your SCORM SCORM Cloud and test if it will show you the results you want.  If so, then your problem is with your LMS.  If this is not your problem may be due to something in the settings of your current project.  Eliminate one thing at a time.

  • How to produce the result of the PowerCLI command in an email?


    Hello world

    Can someone give me help with this example. I started working with PowerCLI and I struggle out of my result in an e-mail message.

    How can I store my result in the array and import the data in HTML in an email?

    In the example below, I don't see any results in the email of the powercli command "Get - VM |" Select-Object Name, NumCPU, MemoryMB, ProvisionedSpaceGB.

    I have to create a loop to retrieve the result?

    # - CHANGE THESE VALUES.
    $SMTPServer = "SMTP.toto.com".
    $vCenterServerName1 = "vsphere1.toto.com".
    $ToAddress = [email protected]
    #-----------------------------------------------------------------------------

    $Title = "connection settings for vCenter.
    $Author = "lady".
    $Header = "connection settings".

    $Login = [email protected]# for domain WHICH
    $Password = "xxxxxxxxxx #

    Add-pssnapin VMware.VimAutomation.Core

    $HTMLHeader = "< HTML > < report VMware TITLE > < /title >"
    $HTMLFooter = 'Made with the Script POWERSHELL 2.0 - Version of the script' + $ScriptVersion + ' < / HTML > ".

    $ScriptVersion = "v1.0".
    $Subject = 'VMware - VM inventory report'
    $FromAddress = "VMware" + "@ foo.com.

    $ColorArray = 'Red', 'Orange', 'Purple', 'Blue', 'Olive', 'SlateGrey', 'Orange', 'Purple', 'Blue', 'Olive '.
    $ColorArrayIndex = 0

    $HTMLHeader = "< HTML > < TITLE > VMware Report for ' + $vCenterServerName1 ' < / TITLE >.
    $HTMLFooter = "Made with POWERCLI Script 5.0" - + $Author + ".." < br > < br > ".
    $HTMLFooter += ' < B > NOTE: < /B > $Date < / HTML > ".


    $HTMLBody = "< BODY >".

    $vCenter_inventory = @(get-VM |) Name Select-Object, NumCPU, MemoryMB, ProvisionedSpaceGB)

    ################################### OUTPUT #######################################

    # HEADER
    $HTMLBody += CreateHeader ("REPORT for < font color = blue > < b > vCENTER" + $vCenterServerName1 + ' < / police > < / b > < br > "" ")

    # INTRO TEXT

    $HTMLBody += ' < br br > > <.
    $HTMLBody += $vCenter_inventory


    # SEND THE REPORT BY E-MAIL.
    $HTMLBody += ' < / BODY > "# close HTML body
    $HTMLPage = $HTMLHeader + $HTMLBody + $HTMLFooter
    Send-Mailmessage-to $FromAddress - to $ToAddress - subject $Subject - BodyAsHTML-body $HTMLPage - normal priority - SmtpServer $SMTPServer
    Write-Host "report was sent by E-mail to '$ToAddress' to ' $FromAddress
    ################################### CLEANUP #######################################

    $HTMLHeader = «»
    $HTMLBody = «»
    $HTMLFooter = «»
    $HTMLPage = «»
    $vCenter1_Inventory = «»
    $vCenterServerName1 = «»

    -Very well, cutting some of your code, it works for me in any case:

    # This sets the format of the HTML table

    "$Header = @".

    TITLE


    "@

    # The data collection

    $vCenter_inventory = get - VM | Select-Object Name, NumCPU, MemoryMB, ProvisionedSpaceGB

    # Convert to HTML format

    $HTML = $vCenter_inventory | ConvertTo-HTML-Fragment

    # Prepare Mail Message

    $Message = "from the random text."

    "$Body = $Header +""+ $Message +"

    "+ $HTML +""

    $smtpServer = "smtpserver".

    $HostName = $env: ComputerName

    $From = $HostName + "@littlenickey.se."

    $To = "[email protected]".

    # Send Message

    Send-MailMessage - SmtpServer $smtpServer - $From - to $To - subject $Subject - body $Body - BodyAsHtml

    This should give you a little nicer output in the form of a table.

  • Can not get the result of the command output to a text file...

    Hello

    I tried to get a list of my virtual machines (using PowerCLI) with CBT (block change tracking) enabled, and while the following command returns the results, I can't have it at the output to a text file. Any help you can offer would be appreciated.

    foreach ($vm in get - vm) {write-host $vm; get-advancedsetting - entity $vm | select-string - pattern 'ctkEnabled' | sort; write-host | out-file c:\somepath\file.txt}

    I get the correct result on screen, but the text file is empty.

    Please notify.

    Thank you

    Hello, wmilligan2013-

    You can get the information to an output file by removing the Write-Host calls.  How to do:

    Get-VM | Get-AdvancedSetting -Name *ctkEnabled* | Sort-Object Entity,Name |    Select Entity,Name,Value,Type | Export-Csv -NoTypeInformation -UseCulture c:\temp\advSettingInfo.csv
    

    Which will be, for any virtual computer that has a * ctkEnabled * advanced configuration, parameter information advanced output for such virtual machine to the CSV file in the appropriate location.  It relies on the ability to Get-AdvancedSetting to accept the VM objects as the value to - entity from the pipeline (so the foreach statement is not necessary) and used the - param Name of this cmdlet, avoiding any disorder Select-String.  I used Export-Csv to the output method so that you can easily consume these data later if you need to act on these data or even manipulate it.

    How does do for you?

Maybe you are looking for