How to complete the data or details of the only this year and the previous year for the given RATNG?

Hi all

I created a form with 5 blocks (namely ENQACMHDR, ENQACMDTL, ENQACEHDR, ENQACEDTL, ENQACSPEC), where I have 8 push buttons (namely ENTER_QUERY, EXEC_QUERY, CLEAR, FIRST, NEXT, PREVIOUS, LAST, and EXIT).

This form is created just for display purposes only. So after that I ran, all blocks have been blocked against insert and update.

I have question on 2 fields 'ENQNO' and "RATNG" (both belong to the ENQACMDTL block).

When I click on "EXEC_QUERY" directly, all data for all years fills.

But the user wanted the data to be populated only this year and the previous year.

Yes, on ' Clause WHERE' of the property_palette of the 'ENQACMDTL' block , I put in the following condition:

SUBSTR (ENQACMDTL. ENQNO, 1, 4) = TO_CHAR (ADD_MONTHS (SYSDATE,-12), 'YYYY') OR SUBSTR (ENQACMDTL. ENQNO, 1, 4) = TO_CHAR (SYSDATE, 'YYYY')

PROPERTY PALETTE (ENQACMDTL block)
WHERE ClauseSUBSTR (ENQACMDTL. ENQNO, 1, 4) = TO_CHAR (ADD_MONTHS (SYSDATE,-12), 'YYYY') OR SUBSTR (ENQACMDTL. ENQNO, 1, 4) = TO_CHAR (SYSDATE, 'YYYY')


Data only this year and the year before are now filled. Its ok with the field of "ENQNO".

The problem is when I have queries on the field "RATNG. 'RATNG' is a Text_item with number of displayed items = 5. (5 lines)


Here are the 2 columns in a Table (name = ENQACMDTL) in the database.


ENQNO RATNG
2013900054500KC2
2013900047800KC4
2013520018750KC6
...............
20129000371000KC2
2012520109500KC2
2012140019750KC6
..................
2011540036500KC2
20111000301000KC2
..................
.................
200610000790KD8
2006750014750KC6
2006900072500KC2

The first 4 issues of "ENQNO" represents the year. There is more than a lakhs of records.

So, when I have queries on the field "RATNG."

Example: for RATNG = 500KC2;

I click on ENTER_QUERY, the field of "RATNG", I put in the 500KC2 of the value and click on EXEC_QUERY; Details regarding the 500KC2 is displayed as well as all the other junk RATNG as 750KC6, 1000KC2 (which belongs to the ENQNO of the current year and previous year) also gets displayed.

I want details of only RATNG (500KC2) to display, but only for the current year and the previous year, it is 2013900054, 2012520109 (ENQNO).

Other than 500KC2 RATNG, no other RATNG must be displayed.

500KC2 = RATNG is also present for ENQNO = 2011540036, 2006900072. But I don't want them to view.

I want only the data or details of the current year and the previous year to be filled or displayed for the given RATNG.

Can you help me or tell me what I do for this?

Hope I'm clear with my question!

If my question is not clear, let me know please.

Thank you.

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

Oracle forms 6i.

1. check null values in the enqacmdtl.enqno, if so treat them properly.

2. check the result of select to_char (add_months (sysdate,-12), 'YYYY') prev_year curr_year of double to_char(sysdate,'YYYY')

3. change the place where clause "year" in the value of numAriques.

where to_number (substr (enqacmdtl.enqno, 1, 4)) > = to_number (to_char (add_months (sysdate,-12), 'YYYY'))

Then let me know the result.

Tags: Oracle Development

Similar Questions

  • How can I restore Adobe Acrobat Professional XI (bought earlier this year, in February; education version) after the restoration of Windows 7 to factory settings? I tried the download link provided by email I received when I just bought, but it didn't wor

    How can I restore Adobe Acrobat Professional XI (bought earlier this year, in February; education version) after the restoration of Windows 7 to factory settings? I tried the download link provided by email I received when I just bought but it did not work.

    Hello

    Use the following link to download:-

    https://helpx.Adobe.com/Acrobat/KB/Acrobat-downloads.html

  • How can I tell if my computer has Excel on this subject and that so how do get me to it?

    How can I tell if my computer has Excel on this subject and that so how do get me to it?

    Check - in the search box type - excel

    It shows up?

    An excel Viewer Help, so you can see the files. If you work on them you need Microsoft Office or if you
    can use OpenOffice which is free.

    Microsoft's free excel file viewers

    Open Office - free
    http://www.OpenOffice.org/

    Rob - support element, Cascade Bicycle Club P.O. Box 15165, Seattle, WA. 98115-0165 206-522-3222-24 hr hotline 206-522-BIKE http://www.cascade.org

  • I get a message saying "drive does not have the ability to access this service and I just paid for 12 months (FOR THE SECOND TIME) in the last two months!

    I get a message saying "drive does not have the ability to access this service and I just paid for 12 months (FOR THE SECOND TIME) in the last two months!

    Hi phillipt84805120,

    Make sure that you have the latest Adobe Acrobat Reader DC (Adobe Acrobat Reader DC install for all versions) installed on your computer to use the services of export to PDF as the older version of Reader support any more.

    Alternatively, you can use services online at https://cloud.acrobat.com/exportpdf

    Let me know if you are still having a problem.

    Kind regards

    Nicos

  • How to complete the data not sorted in the listview?

    Hello

    I use the model dataset to display the list, but the content populated sort alphabatically. How to display the list without sorting?

    Thank you

    Dembélé George Jacob

    Why do you use a sort template when you do not want to sort the list simply use one of the other patterns?

  • How to complete the list of values when loading screen

    Hi all

    I have a list of values based on another field (ANOTHER_FIELD).

    for example
    Select the value d, r
    from table_name
    where id =: ANOTHER_FIELD;

    ANOTHER_FIELD has a default value.

    But when the screen is opened to the list of values does not have the default value and the values list is empty.
    Just when it is filled with submission of the form, the list of values.

    Please tell me how can I complete the list of values when loading screen.

    Thank you!

    Hello

    It depends on how you have defined the default value for ANOTHER_FIELD.

    I always set my default settings using a calculation, that runs before header, on the element that defines the value using a static assignment, but to ensure that the calculation is dependent on the order of the day being NULL - try this

    Andy

  • How to complete the implementation of process after inserting the new sim card to unlock the phone

    Try to unlock the phone more 6s with ATT, but do not know how to perform the implementation of process after inserting the new sim card. I got the unlock code confirmed att.

    After the unlock code is confirmed, you will have to restore the unit to the factory via iTunes settings.  He must inform you that the device is unlocked, THEN you change sim cards.

  • How to complete the action of the OK"" button.

    Hi all

    I am very new to LabVIEW and am not aware of a lot of simple things. Here's what I want to do...

    I want to change a complex VI (not written by me) and want to do a few simple things. There are several entries in my VI:

    (1) constant integers (take for example as "we LED time in seconds")

    (2) OK button (lock type) who starts to things (for example, switches on the LED and LED remain lit for the specified time.

    So, whenever one must press the OK button after entering the duration of start-up!

    Now, I would like to make a small update where I wish to enter a sequence (table 1 d) of the running time, which is good, but how to create a table of switching action OK?
    In my understanding of the OK switch is Boolean type Latch signal and I do not know how to escape manual several clicks on the OK button by some smart changes.

    Any support here will be very appreciable.

    NB. to give a better picture, I tried to create the VI for example virtual LED that I described above, but I have no measurable. Maybe I'm trying to jupm too fast

    You can only run your table in a loop FOR with just a simple press OK.  I hope that your help subVIs you don't have to duplicate the code.

  • try to install KB955430 and get error 800f0825 can not find information on how to complete the upgrade

    KB 955430 is an important update, when I tried to install it, it failed.  The error message is 800f0825, but I can't find that he listed

    Hello

    see if that helps to fix:

    How to reset the Windows Update components?

    There is also an automatic 'fix - it' here

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

    Also, try to put the KB numbers in the search on the link below and then manually download the

    http://www.Microsoft.com/downloads/en/default.aspx

     

    or please repost your question in the correct windows update forum

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_update?page=1&tab=all

  • How to complete the form "Adobe Runtimes / reader Distribution License Agreement.

    I just spend some time to talk with Adobe support engineer license that could not solve my problem.

    I intend to distribute Reader and Flash in our windows domain. I don't understand all the technical stuff on the strategies group, installpoints, application of msi MSP etc...

    The issue I'm having is to complete the contract Adobe runtimes distribution /reader license request form.

    https://www.Adobe.com/cfusion/mmForm/index.cfm?name=distribution_form & PV = RDR

    I do not understand what Adobe submit me in the mandatory field labeled "Please indicate the product or service name and description.

    Call me stupid or stubborn, you want to, but I'm reluctant to send this form (and so agree to the license) when I don't fully understand.

    There is no other explanation lies in this form and an engineer support-license-don't know either and this forum was told.

    Who here has already filled out the form and you can help me with my question?

    Also, if someone from Adobe reads this, you can add some tips on the form or short, you support staff on this.

    He wondered about the product or service in which the Adobe software will be 'distributed' - for example if I give a USB to a trade fair for Quahog flanges LLC and include Adobe Reader on it, I type something like "included the flanges of Quahog USB drive, distributed to the general public". In case you might say something like "for distribution within our network of the company only.

  • How to complete the process with the event look inside

    Hi all

    I have a workflow, a part of it contains a branch of the sort Portal:

    Branch 1: Wait point (7 days)

    Branch 2: event listening

    If after 7 days and no event is sent, auto workflow email and closed user

    Otherwise that he will be sent to another user.

    I observe that if the event is received, then at the end of the status of process can be COMPLETED. But if after 7 days and no event is received, after the end user completes the form, the State of the process is still ONGOING.

    I think this approach: 1 sending event adding after waiting in branch 1, it send an event for this branch 2 can be completed.

    Is there another solution to complete such a process?

    Thanks and regards,

    Anh

    instead of using a gateway and a reception event, catch the event on the wait operation (so that the icon of the event is on the corner of the icon of the wait operation). In this way, the event is listened while during the time that the wait operation is running. You draw a route out of operation, and you draw a route out of the capture of the event. In the case of the capture of the event, its route is followed but not the other. Make sense?

    http://help.Adobe.com/en_US/LiveCycle/9.0/workbenchHelp/000113.html#1032048

    Scott

  • How to ask the printer to make copies? I place something under the cover of theHP Deskjet F2480 to make a copy. HOW TO COMPLETE THE COPY?

    i AM A COMPUTER DUMMIE. I NEED TO FIND A WAY TO MAKE COPIES ON MY PRINTER. It's a HP Deskjet F2480, printing, scanning, copying. I thought it would be easier to fill. I do NOT think! What is a colleague to do so?

    Hello

    Thanks for posting your query in Microsoft Community Forum!

    According to the description, it seems that you need help to make copies paper using HP Deskjet F2480 all-in-One Printer.

    I will certainly help you this.

    I suggest you for the link and check if that helps.

    Manuals for HP Deskjet F2480 all-in-One Printer

    If you have any questions on Windows, feel free to let us know. It is our pleasure to be of service.

  • How to make a user able to connect only once? and how do I restrict a user authorized to vote only 15 candidates and the brand of vote count?

    Hello

    I'm just doing my project which is the voting system. So my first question is how to make a user or a voter can connect once only using their username and password? After that they brought their vote, they can not be able to connect to a vote. Here, the user name, I replace it with IC and the password I can replace the ID (student ID). Here is my code for the connection:

    <?php
    if(isset($_POST["submit"])){
    $user=$_POST['IC'];
    $pass=$_POST['ID'];
    
    
    $con=mysql_connect('localhost','root','pass') or die(mysql_error());
    mysql_select_db('ses') or die("Cannot select DataBase");
    
    
    $query=mysql_query("SELECT * FROM voters WHERE IC='".$user."' AND ID='".$pass."'" );
    $numrows=mysql_num_rows($query);
    if($numrows!=0)
    {
    while($row=mysql_fetch_assoc($query))
    {
    $dbusername=$row['IC'];
    $dbpassword=$row['ID'];
    
    
    }
    
    
    if($user == $dbusername && $pass == $dbpassword )
    {
    session_start();
    $_SESSION['sess_user']=$user;
    $_SESSION['sess_pass']=$pass;
    
    
    
    
    /*Redirect browser*/
    header("Location: main.php");
    }
    }else{
    echo "Invalid IC Number and ID Number!";
    }
    }
    ?>
    
    

    for the second question is how to limit a voter to vote only 15 candidates and counting of the vote that voters go? When the vote is made with 15, then the popup script appears informed that the elector make themselves with their vote.for this I use box as a method of voting and each checkbox have the id which is the primary key. I appoint the id as 'No' and set it as the primary key. Here is the code for voting:

    <?php
    $servername = "localhost";
    $username = "root";
    $password = "pass";
    $dbname = "ses";
    
    
    // Create connection
    $conn = new mysqli($servername, $username, $password, $dbname);
    // Check connection
    if ($conn->connect_error) {
         die("Connection failed: " . $conn->connect_error);
    }
        
    $sql = "SELECT No, Calon, ID, Jurusan, Image FROM candidates";
    $result = $conn->query($sql);
    
    if(isset($_POST['vote'])) {
        
    //get the ID value from the radio button form field and store in an array.
    $update_vote = $_POST['candidate_id'];
    
    //loop through the array and update the database
    foreach ($update_vote as $value) {
    $vote_sachin = "UPDATE candidates SET Undi=Undi+1 WHERE No=".$value."";
    $run_sachin = mysqli_query($conn, $vote_sachin);
    
    
        }
    
      header("Location:http://localhost/VotingSystem/");
    }
    
    
    ?>
    
    
    <form method="post" id="form1" action="main.php">
    <?php
    if ($result->num_rows > 0) {
    echo "<table border >
    
    
    <tr>
    <th>NO</th>
    <th>Candidate</th>
    <th>INFO</th>
    <th>Vote</th>
    </tr>";
    // output data of each row
    while($row = $result->fetch_assoc()) {
    echo "<tr>
    <td align='center'>" . $row["No"]. "</td>
    <td><img src=" . $row['Image'] . " width=120px height=150px></td>
    <td><br/>" . $row["Calon"]. " <br/>" . $row["ID"]. " <br/>" . $row["Jurusan"]. "<br/></td>
    <td align='center'><input type='checkbox' name='candidate_id[]' value='".$row['No']."'></td>
    </tr>";
    }
        echo "<tr><td></td><td></td><td></td>
        <td><input type='submit' name='vote' value='VOTE'</td>
        </tr>";
    echo "</table>";
    
    
    } else {
    echo "0 results";
    }
    $conn->close();
    
    
    ?>
    
    

    I hope someone can help me with this because I'm still trying to learn this by my own php code...

    Thank you

    # 1, add a Boolean column in the table (VoteSubmitted) and the value initially FALSE to follow if the user has already voted.  Check this field when they connect. If the field is set to TRUE, displays a message and cannot vote again. When they get it vote, update the field from FALSE to TRUE.

    # 2, I would like to do this with javascript to allow them to select all their candidates and submit once. You could start with something like this:

    Cut paste & limit the number of boxes checked script

  • How to complete the data for months current quarter of the last month of the previous quarter

    • Here is the create table and insert the statement how my data is as
      CREATE TABLE SAMPLEDATA (Snapshot_M DATE, Date_Ky DATE, F_Quantities INTEGER)
      INSERT INTO VALUES SAMPLEDATA (SEPTEMBER 1, 2014 ", 1 SEPTEMBER 2014", 14)
      INSERT INTO VALUES SAMPLEDATA (OCTOBER 1, 2014 ", 1 OCTOBER 2014", 13)
      INSERT INTO VALUES SAMPLEDATA (1 NOVEMBER 2014", 1 NOVEMBER 2013', 12)
      INSERT INTO VALUES SAMPLEDATA (DECEMBER 1, 2014", 1 DECEMBER 2013', 11)
      INSERT INTO VALUES SAMPLEDATA (JANUARY 1, 2014 ", 1 JANUARY 2014", 10)
      INSERT INTO VALUES SAMPLEDATA (FEBRUARY 1, 2014 ", 1 FEBRUARY 2014", 90)
      INSERT INTO VALUES SAMPLEDATA (MARCH 1, 2014 ", 1 MARCH 2014", 20)
      INSERT INTO VALUES SAMPLEDATA (APRIL 1, 2014 ", 1 APRIL 2014", 23)
      INSERT INTO VALUES SAMPLEDATA (MAY 1, 2014", 1 MAY 2014', 30)
      INSERT INTO VALUES SAMPLEDATA (JUNE 1, 2014 ", 1 JUNE 2014", 70)
      INSERT INTO VALUES SAMPLEDATA (JULY 1, 2014 ", 1 JULY 2014", 20)
      Desired results set:
      Snapshot_M Date_Ky F_Quantities
      10 1/1/2014-2/1/2014
      10 1/1/2014-3/1/2014
      01/01/2014 41 10/2014
      4/1/2014 5/1/2014 23
      4/1/2014 6/1/2014 23
      4/1/2014 7/1/2014 23

      My requirement is to load the data in the cube.

      So to summarize, data that are loaded onto the month last only a quarter Q1 tax (Jan) should server as a data for the quarter Q2 next month (February, March, April), the data loaded on the last month of Q2 (Apr) will be server as forecast data for Q3 months and so on.

      Thank you in advance.



    with

    SAMPLEDATA as

    (select to_date('09/1/2014','mm/dd/yyyy') snapshot_m, to_date('09/01/2014','mm/dd/yyyy') date_ky, 14 f_quantities of all the double union)

    Select to_date (October 1, 2014 "," mm/dd/yyyy ""), to_date (1 October 2014 "," mm/dd/yyyy"), 13 union double all the

    Select to_date (November 1, 2013 "," mm/dd/yyyy ""), to_date (1 November 2013 "," mm/dd/yyyy"), 12 union double all the

    Select to_date (December 1, 2013 "," mm/dd/yyyy ""), to_date (1 December 2013 "," mm/dd/yyyy"), 11 union double all the

    Select to_date (January 1, 2014 "," mm/dd/yyyy ""), to_date (1 January 2014 "," mm/dd/yyyy"), 10 of all the double union

    Select to_date (February 1, 2014 "," mm/dd/yyyy ""), to_date (1st February 2014 "," mm/dd/yyyy"), 90 union double all the

    Select to_date (March 1, 2014 "," mm/dd/yyyy ""), to_date (1 March 2014 "," mm/dd/yyyy"), 20 union double all the

    Select to_date (April 1, 2014 "," mm/dd/yyyy ""), to_date (1 April 2014 "," mm/dd/yyyy"), 23 union double all the

    Select to_date (May 1, 2014 "," mm/dd/yyyy ""), to_date (1 may 2014 "," mm/dd/yyyy"), 30 union double all the

    Select to_date (June 1, 2014 "," mm/dd/yyyy ""), to_date (1 June 2014 "," mm/dd/yyyy"), 70 union double all the

    Select to_date (July 1, 2014 "," mm/dd/yyyy ""), to_date (1 July 2014 "," mm/dd/yyyy"), 20 union double all the

    Select to_date (August 1, 2014 "," mm/dd/yyyy ""), to_date (1 August 2014 "," mm/dd/yyyy"), 22 of the double

    )

    Select snapshot_m, date_ky, last_value (f_quantities) ignore nulls on f_quantities (order by date_ky)

    of (trunc (add_months (snapshot_m-1), 'q') select snapshot_m, date_ky,)

    -case when trunc (add_months (snapshot_m-1), 'q')! = lag (trunc (add_months(snapshot_m,-1), 'q')) (date_ky order)

    then lag (f_quantities) (date_ky order)

    end f_quantities

    of sampledata

    where date_ky > = date ' 2014-01-01'

    )

    where snapshot_m > = date ' 2014-01-01'

    order of date_ky

    SNAPSHOT_M DATE_KY F_QUANTITIES
    01/01/2014 01/02/2014 10
    01/01/2014 01/03/2014 10
    01/01/2014 01/04/2014 10
    01/04/2014 01/05/2014 23
    01/04/2014 01/06/2014 23
    01/04/2014 01/07/2014 23
    01/07/2014 01/08/2014 20
    01/07/2014 01/09/2014 20
    01/07/2014 01/10/2014 20

    Concerning

    Etbin

  • How to complete the data in the view object

    Hi all

    I'm quite new with ViewObject.

    I have a data table that comes with the view object.

    I want to fill in the data in the view of my managed bean object.

    How can I achieve this kind of scenario?

    in fact, I try to get view object as follows. but I only null.

    ViewObject viewobject = DCIteratorBinding.getViewObject ();

    With respect,
    Wai Phyo

    Hello

    You can use the following code snippet to get the handle of object of the iteration.

    FacesContext fc = FacesContext.getCurrentInstance ();
    BindingContainer links =.
    (BindingContainer) fc.getApplication () .evaluateExpressionGet (CF,
    "#{bindings}."
    BindingContainer.class);
    DCBindingContainer bc = links (DCBindingContainer);
    Iterator = DCIteratorBinding
    bc.findIteratorBinding ("");
    ViewObject viewObject = iterator.getViewObject ();

    Perform operations on the view object

    Thank you
    Nini

Maybe you are looking for

  • Problem syncing with iPod Nano

    I have an iPod nano 3rd generation. He stopped properly syncing with iTunes. I have the latest version of ITunes and Windows 10. It is always synchronized automatically before. The computer recognizes the iPod and it's synchronization on iPod, but no

  • minimize button disappeared in apple mail

    Button reduce disappeared in Apple mail.  In addition, the dock at the bottom of the screen is hidden when I am in Apple mail.  Please help!-thanks, Anna

  • Updated Slash export shortcuts

    Hello I recently installed DIAdem 2015 and I was wondfering if there is a way to export all of my setting custom from 2014 to 2015? For example all my scripts shortcut, my data pluggins, etc.. Its all really boring loading manually every year especia

  • Change the product key with a Windows 8.1 apdate

    I WANT 4 - 1130us I've had for about 1 year and it came with pre-installed Windows 8.  I've since updated to Windows 8. 1. On the screen: System control panel - system and safety - is a link to "Get more features with a new edition of Windows".  When

  • Printers HP j4680 all-in-one: report of transmission J4680

    I have a HP j4680 all-in-one printer and am running Windows 7.  I no longer receive the audit reports of transmission when I send a fax.  I received of these reports, but for some reason any printer no longer prints this form after the fax is sent.