How to choose the maximum value in a column of a table by using the cursor and iteration

Hello everyone
I have a table loan_detail
and a column inside loan_amount
now I want to take the values in this table with the cursor, then using iteration that I want to take a max value of him using this slider
Here is my table
LOAN_AMOUNT

100
200
300
400
500
5600
700
I could make using the concepts of single loop, but when I tried to do by using the slider I wasn't able to do.
Concerning
Prost

You can get the maximum value for a particular column in SQL, PLSQL needn't; Always avoid PLSQL so you can do it in SQL. But always as an example:

declare
number of Temp: = 0;
Start
for news in some loan_amt of loan_detail
loop
If (temp
end if;
end loop;
dbms_output.put_line (temp);
end;

Edited by: Mahanam January 5, 2011 03:11

Tags: Database

Similar Questions

  • maximum value for a column in a table without using rownum and rowid, group

    Hi all

    Is it possible to recover the maximum value in a column of a table without help:
    1 rownum and rowid.
    2. the Group
    3. any built-in function of Oracle.

    Kindly let me know if possible.


    Kind regards.

    Published by: J2EE_Life on January 23, 2012 21:06
    select e1.empno
      from scott.emp e1
      left outer join scott.emp e2 on e1.empno < e2.empno
     where e2.empno is null
    
  • How to choose the value of a string are numeric together and words of letters (for example, TEST)

    Hi all

    How to choose the value of a string are letters (for example, TEST) and all numeric...

    for example
    TEST 123456
    TEST 34567
    123456 ABCD
    1234 TEST
    TESTING 12345
    TEST 1@234$
    YOUR T 123456

    I want the results of the query as below.
    TEST 123456
    TEST 34567

    And I tried to use regexp_like in this case but without success. See the code below.
    SELECT * FROM TABLE WHERE regexp_like (Description, ' [TEST] % & [[: digit:]] + $');

    How can I do this, please answer.

    Thank you

    WF

    If you want to return only the rows that contain the string 'TEST', followed by zero or more space characters, followed by one or more digits?

    How about this:

    SELECT *.

    FROM my_table

    WHERE REGEXP_LIKE(description,'^TEST\s*\d+$')

  • How to choose the textfield values form and calculate

    Treat all

    Urgent please help

    How to choose the textfield values form and calculate totals. IE when clint fill amount textfield other textfields automatically calculate and display values. I am using uninstall.

    Thanks in advance

    My code is more

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""

    " < html xmlns =" http://www.w3.org/1999/xhtml ">

    < head >

    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"

    < title > Untitled Document < /title >

    < / head >

    < body >

    < table width = "400" border = "0" align = "center" cellpadding = "0" cellspacing = "0" >

    < tr >

    < td width = "187" align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "amount_gbp" > total (GBP): < / label >

    < / strong > < table >

    < td width = "14" height = "30" > < table >

    < td width = "199" height = "30" > < label >

    < input type = "text" name = "textfield" id = "textfield" / >

    < / label > < table >

    < /tr >

    < tr >

    < td align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "admin_char_gbp" > Admin amount (GBP): < / label >

    < / strong > < table >

    < height td = "30" > < table >

    < height td = "30" > < label >

    < input type = "text" name = "textfield3" id = "textfield3" / >

    < / label > < table >

    < /tr >

    < tr >

    < td align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "agent_char_gbp" > Agent Charges (GBP): < / label >

    < / strong > < table >

    < height td = "30" > < table >

    < height td = "30" > < label >

    < input type = "text" name = "textfield4" id = "textfield4" / >

    < / label > < table >

    < /tr >

    < tr >

    < td align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "total_amount_gbp" > amount Total (GBP): < / label >

    < / strong > < table >

    < height td = "30" > < table >

    < height td = "30" > < label >

    < input type = "text" name = "textfield6" id = "textfield6" / >

    < / label > < table >

    < /tr >

    < tr >

    < td align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "total_paid_gbp" > Total paid (GBP): < / label >

    < / strong > < table >

    < height td = "30" > < table >

    < height td = "30" > < label >

    < input type = "text" name = "textfield7" id = "textfield7" / >

    < / label > < table >

    < /tr >

    < tr >

    < td align = "right" valign = "middle" class = "KT_th" > < strong >

    < label for = "balance_gbp" > balance (GBP): < / label >

    < / strong > < table >

    < height td = "30" > < table >

    < height td = "30" > < label >

    < input type = "text" name = "textfield8" id = "textfield8" / >

    < / label > < table >

    < /tr >

    < /table >

    < / body >

    < / html >

    Here´s a pointer which will show you how to set the calculation within a javascript function: dynamically calculate the sum of the fields

    See you soon,.

    Günter

  • How to choose the display by default when you use two screens on my Mac Pro?

    How to choose the display by default when you use two screens on my Mac Pro?

    The default view when you have several is made that you drag the little icon in the menu bar in this pane:

    .

  • When you export (share) a project, how to choose the thumbnail of the freeze frame which restores the clip?

    I just shared (exported) a project that is a simple take a clip for a friend who has downloaded on its website. The problem is that, when the video ends by playing on his site, he returned to a freeze frame that seems completely random and is not the image I want. How to choose the exact image that the video will return as "thumbnail by default?"

    Thank you

    Kevin

    Cannot set lla at the FCC. Many layout site Web apps will allow you to set the poster frame for the video files.

  • How to choose the download location? download automatically to the users in c drive folder. I want to change it... Please help me...

    How to choose the download location? download automatically to the users in c drive folder... I want to change my office... Please help me out...

    Tools-> Options-> save-> click on the Browse button and find the folder where you want to save the files.

  • HP pavilion 15-e034tx: how to choose the right RAM for laptop

    How to choose the right RAM for my laptop (Pavilion 15-e034tx). I know I should buy DDR3 ram.

    Are there other factors should I consider when buying one? I got 2 slots for ram, which od these combos are possible?

    1-4 + 4 GB
    2-4 GB + 8 GB
    3-8 GB + 8 GB

    Thank you

    From the Manual:

    Two customer accessible/upgradable memory module slots

    Support for dual channel DDR3L (1600 MHz)

    Support 8192 MB RAM system in the following configurations:

    8192 MB (8192 MB × 1, × 4096 MB 2)

    Manual download link

    See page 53 for instructions. Memory access is easy via the service Panel. This is the part number for the approved 4 HP concert module:

    4 GB (PC3L, 12800, 1600 MHz) 691740-001

    http://www.Amazon.com/HP-691740-001-4GB-1600MHz-PC3L-12800/DP/B00CI08FX4/ref=sr_1_2?ie=UTF8 & qid = 1451655870 & SR = 8-2 & Keywords = 691740-001

    A 8 GB module is listed in the manual, and it's a 3rd generation of processor i5 I suspect 2 x 8 = 16 concerts would work, but strictly following the manual your only option is to add a 4 GB for a total of 8. Most users really not more 8 GB and adding a second identical module will allow two-channel operation, so you should see a noticeable jump in the overall performance.

    If it's 'the Answer' please click on 'Accept as Solution' to help others find it.

  • 4540 proBook s: how to choose the right network driver

    Hello guys. I clean installed Windows 7 Professional. Now, I see that I can not connect my computer to the internet, so I need to install the network drivers. I wen to the HP website and saw that there are 19 different network for my laptop drivers.
    How to choose the right method?

    Hello:

    Below are the links to the ethernet and wireless drivers you need...

    Wireless:

    This package contains the installation package driver for Ralink wireless LAN controllers in the laptop models running a supported operating system.

    File name: sp66089.exe

    This card also needs a bluetooth driver...

    This package contains the OS driver installation package for the Ralink Bluetooth in laptop computers running taken in charge.

    File name: sp59632.exe

    Ethernet:

    This package provides the driver for the Ethernet Realtek controller in the laptop models running a supported operating system.

    File name: sp63213.exe

  • How to choose the slot one of the two bunk?

    How to choose the slot one of the two bunk?

    Select the two points to cross the selection with the open selection tool, and then clear the high point on the page by holding shift and clicking on it.

    or vice versa. Select the high point of the page first and then select now shift. the high point of the page désélectionnera.

  • How to set the value of a column in a table according to another column?

    Hello world!

    I use Apex 4.1.
    My question is how can I set the value of a column in a table according to another column?
    I have a table and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).

    I tried to use javascript as
     $('input[name=f02]').live('change', function(){
    if($(this).val()!='1'){
    $('input[name=f03]').val("test")}
    }); 
    for the development of the column note to test if the value typed in the content of the column is not 1, but this code assigns the value to all the lines and I need to set only the specified line.

    Can someone give me a hint in any way to do this if possible?

    Kind regards
    drama9346

    You will need create a process on your page type PLSQL and develop this process "we demand" of the page. In this process, you can run the PLSQL you need. That is to say to retrieve the note value as described in your PC:

    and when I insert the value in the column content, I want to change this value in the note column with the note, which is generated with pl/sql function (function of string returned if the typed value is in the range).

    In this process, you must provide a return value of the call, and you can do this by using htp.p. Example:

    DECLARE
       --putting x01 in a var to simplify
       l_test_var VARCHAR2(200) := apex_application.g_x01;
       l_return VARCHAR2(200);
    BEGIN
       -- a simplistic test
       IF LENGTH(l_test_var) BETWEEN 10 AND 20 THEN
          l_return := 'String is between 10 and 20';
       END IF;
    
       --this will write l_return to the buffer, and the ajax callback will receive this
       htp.p(l_return);
    END;
    

    And the code that I wrote above, which is javascript, would need to go where your current code is that binds to the onchange event. The result should be that, when a change is made to this element, an ajax request is made on the server. When the call is finished, it will be the value returned in the item you want.

  • How to choose the language of the application

    Hello, how to choose the language of the application, I have is Russian, and I want an English version?

    Hello

    Welcome to Adobe Community.

    If you need to install the product in a different language, you can simply launch Creative Cloud Desktop and click on the settings tab in the upper right. On the settings tab, you will find the possibility to click on applications. Once we navigate to apps, you can change the language there.

  • How to choose the scheme of work of a different database instead of the database target

    Hi everyone, can you please answer to my problem.

    Q1.is it is mandatory that the two target schema schema and work must present in a database.if not then How to choose the scheme of work of another data base instead of target database schema. Please suggest.

    __Description__

    My work, my work patterns in odi's in a database schema and target in a different database,
    Now I'm dataserver with identification of the target or credentials of scheme work information.
    Here's the problem.

    I can't see scheme of work in the drop-down list when you create the physical schema with data server with the credentials of the target.

    It's obvious that he cannot show the workschema which presents in an another database.because - database server has the schema of the target database credentials.

    Vice versa

    Please suggest

    Concerning
    Chantal

    Hello

    Your KM will create the tables for working in the schema, you write to and that's why you have the problem:

    create table< %="odiRef.getTable" ("l",="" "int_name",="" "w")="" %="">

    I don't know of an option to replace this 'W' that will say 'go and get work in the staging area, I've specified.

    I guess that you can customize the KM and pass all the commands to Execute on the Source tab, or I guess you could specify the schema for each of the steps to be the logic diagram of the various staging areas.

    BUT I don't know if it would work throughout and I think it will create a massive Mount of work unnecessarily.

    Is there a decent reason why you can not have the staging area on the target?

  • FOR ADMINS - how to choose the right answer on a thread on this forum?

    FOR ADMINS - how to choose the right answer on a thread on this forum?

    For example, on:

    "missing plug-in" for safari after you download!

    http://forums.Adobe.com/thread/897677?TSTART=0

    It does not show on 5.1 Safari and Firefox on Mac OS X 10.6.8 6.0.2.

    Thank you!

    The normal user (non-admin type), which can mark a reply as useful or appropriate is the user who started the discussion.

  • How to choose the right project settings?

    I am new in taking video and modifying them. I bought a Sanyo Xacti HD camcorder and a lot of clips in my last trip. The clips are transferred to my count and have the format. Depth of MP4 1280 - 720 1280 and 29.97 frames per second.

    I want to create after having been released on DVD I can show on my TV 16:9 (PAL Netherlands)

    When I create a new project, I choose the seetings and I don't really know how to choose!

    Should what project settings I choose in the settings I see that 30 fps under NTSC systems. Is there somewhere a general explanation how?

    Help will be very appreciated!

    Greetings Willem

    Before the NTSC in PAL, I think that there are other major considerations.

    1. you save the 16:9 720 p 30 1280 x 720 at 30 frames per second, using the MPEG-AVC/H.264 codec). Seems to me you are dealing with what they call "AVCHD Lite". If so, there are major problems of basic editing in first Elements 7. See the FAQ of Steve Grisetti

    http://forums.Adobe.com/thread/454585?TSTART=0

    2. your comments suggest that you want to create the widescree of DVD-VIDEO (16:9) of your timeline.

    3. so, first and foremost, I would determine if you can successfully bring your video in Elements 7 first and export the DVD-VIDEO in NTSC system, before thinking on the conversion of a video NTSC a PAL end product.

    4. as a general rule, you select the preset of the project (new project dialog box) to match the properties of your video. Once done this will not stop you changing predefined export later. In the case of your NTSC by Sanyo 720p30 video, I suggest the project (new project dialogue box) = NTSC HDV HDV 720p30 preset. Think the project defined by default as a template from which you can edit your video. Although this 720 p is a variant of AVCHD, I would suggest the HDV category since there is no preset under AVCHD 720 p. Note that the descriptions on the right which you have set the preset.

    5. in Share/disc/disc, in the dialog box burn, and then select the preset: NTSC_Widecreen_Dolby DVD. If it's all completed successfully, then we can talk about conversion of NTSC 1280 x 720 16:9 for a DVD VIDEO PAL (720 x 576 25 fps with a flag from 16:9 to stretch the video on screen after the encoding).

    6. you can find the following link helpful:

    http://www.Camcorderinfo.com/content/article_converting_ntsc_pal.htm

    RTA

Maybe you are looking for