How to generate a function of attandance

Oracle Forms6i

Hai All

I generated a form of participation
I created four buttons

Browse, process, save, exit

Now the first step by using Browse, it retrieves the text of the file file
This is my encoding
DECLARE
name varchar2 (100): = "nom_chemin";
BEGIN
filename: = GET_file_NAME (': nom_chemin ', NULL, ' Text files only(*.)) (TXT). *. TXT |', NULL, OPEN_file, TRUE);
: global.filename: = filename;
END;

Its working fine

For example, the text file is like this

000000000994928601112009011300000010151
000000000995108301112009014100000010151
000000000995993001112009014300000010151
000000000993407201112009014300000010151
000000000994888501112009014300000010151

Then using the process button
I've separated this file text into three parts
16 first is code
8 second is date
4 third is times
the encoding is

declare
pin_no varchar2 (25);
pin_time varchar2 (25);
date of pin_date;
Ilan varchar2 (200);
m_file TEXT_IO. TYPE_DE_FICHIER;
m_file_path varchar2 (100): =: global.filename;
number of line_count;
Start
If m_file_path is not null then
m_file: = TEXT_IO.fopen (m_file_path, 'r');
go_block ('TEST_SRI');
clear_block (no_validate);
loop
Start
TEXT_IO.get_line (m_file, Mstr);
MSTR: = ltrim (rtrim (mstr));
: bar code: = substr (mstr, 1, 16);
: bardate: = to_date (substr(mstr,17,8), ' yyyy/mm/GFMD');
: bartime: = substr (mstr, 25, 4);
next_record;
Exception
When no_data_found then
TEXT_IO.fclose (m_file);
"exit";
end;
end loop;
premier_enregistrement;
end if;
exception
while others then
message (sqlerrm);
end;

the encoding works very well

Then the next step is that I had a table called dail_att, that I have the fields they are

EMPCODE NUMBER
EMPNAME VARCHAR2 (25)
BAR CODE VARCHAR2 (25)
VARCHAR2 (25) RESPONDENT
OUTTIME VARCHAR2 (25)
INTRTIMEIN VARCHAR2 (25)
INTROUTTIME VARCHAR2 (25)
DATE OF ATTEND_DATE
PERTIMEIN VARCHAR2 (25)
PERTIMEOUT VARCHAR2 (25)

--------------------------------------------

There are 3 shifts

0815 to 1645 then 0815 is timein and 1645 timeout

1200 to 2000, from 1715 to 0145 tmrw mrg
According to what we have stored this calendar in related areas

I created a procedure and stored in programunit

procedure test_pro is

The CNT number;
CNT2 number;
today_bar varchar2 (25);
today_in varchar2 (10);
today_out varchar2 (10);
yest_in varchar2 (10);
yest_out varchar2 (10);

Start
go_block ('TEST_SRI');
PREMIER_ENREGISTREMENT;
loop
Select count (*) in the dail_att cnt where BARCODE =: bar code
and ATTEND_DATE =: bardate;
Select count (*) from cnt2 dail_att where BARCODE =: bar code
and ATTEND_DATE =: bardate-1;

If (NTC <>0) then

Select the BAR code, RESPONDENT, OUTTIME today_bar, today_in, today_out from dail_att where BARCODE =: bar code
and ATTEND_DATE =: bardate;

Update dail_att set = outtime: bartime where barcode =: bar code
and ATTEND_DATE =: bardate;
on the other
If (cnt2 <>0) then

Select RESPONDENT, OUTTIME in yest_in, yest_out from dail_att where BARCODE =: bar code
and ATTEND_DATE =: bardate-1;

f (yest_in is not null and yest_out is null) then
Update dail_att set = outtime: bartime where barcode =: bar code
and ATTEND_DATE =: bardate-1;
on the other
insert into dail_att(barcode,intime,attend_date)
values(:Barcode,:Bartime,:bardate);
end if;
on the other
If: bartime between 0100 and 0630

insert into dail_att(barcode,intime,attend_date)
values(:Barcode,'1700',:bardate-1);

Update dail_att set = outtime: bartime where barcode =: bar code
and ATTEND_DATE =: bardate-1;
on the other
insert into dail_att (codes bars, intimate, attend_date
values(:Barcode,:Bartime,:bardate);
end if;
end if;
end if;
WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE" OR: BAR CODE IS NULL;
NEXT_RECORD;
END LOOP;
Forms_ddl ('commit');
message ('hai');
exception
while others then
forms_ddl ('rollback');
message(SQLERRM|| dbms_error_Text);
message(SQLERRM|| dbms_error_Text);
End;


It works fine but I extract some records, IE if there are 600 then it get only 300

When using the shutter release button I call this procedure

My problem is

Consider a table with 6 fields ie timein, intrtimein, pertimein, pertimeout, intrtimeout, timeout

I'm generating a table of attendance and a table contains 6 different times for an employee and we need to fix it in order

0815,0816,1230,1250,1645,1646

If 0815 is the starting point then ie mintime timein

0816 stored in intrtime

then1250, then stored it in pertimein

1230 then it kept at pertimeout

then 1645 stored in intrtimeout

then 1646 stored in the time-out period

I tried with max and min function but its not work properly pls tell me some solutions

Thanks and greetings

Srikkanth.M

I think better to change your table structure.

Create another table of encoding/master for entry type and a link to your table with her instead of having 6 columns.

in the forms, it's easy to make your requiremetn...

Check your time with if and assign the field in the block

  if :bartime between to_date('0815','HHMI') and to_date('1200','HHMI') then
      :entrTime := :bartime;
else.....

I hope I understand your condition

Bangoura
[My Oracle Blog | http://baigsorcl.blogspot.com/]

Tags: Oracle Development

Similar Questions

  • How to generate an impulse to test short circuit in an inducer

    Hello

    IM new to labview and am in need of complete SURG - SURGE STRESS TEST

    This test is intended to detect a short tour inter by applying a number of high
    voltage pulses (or surge) for the selected winding.
    Each pulse should produce one sinusoidal transient that eventually decreases to zero.

    How to generate the impulse using labview.

    Hi Jessica,.

    Please see the "pulse pattern.vi" function--> pallets of signal processing signal generation.

    Otherwise, you can browse through examples of LabVIEW.

    Kind regards

    Srikrishna.J

  • How to call the function cascade BlackBerry

    I begineer in blackberry c ++.

    I do two class is testobject and second in test .i call the onther text function average () and nexttext();

    so please how to call this function.

    // Default empty project template
    #include "TestObect.hpp"
    
    #include 
    #include 
    #include 
    
    using namespace bb::cascades;
    
    TestObect::TestObect(bb::cascades::Application *app)
    : QObject(app)
    {
        // create scene document from main.qml asset
        // set parent to created document to ensure it exists for the whole application lifetime
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
        // create root object for the UI
        AbstractPane *root = qml->createRootObject();
    
        // set created root object as a scene
        app->setScene(root);
    }
    
    void TestObect::test(){
    
        qDebug()<< "****************Naveen";
    }
    

    I insert also declared in the header file.

    Q_INVOKABLE Sub test();

    then I create another test class.

    /*
     * test.cpp
     *
     *  Created on: Apr 2, 2013
     *      Author: nksharma
     */
    
    #include "test.h"
    
    test::test() {
        // TODO Auto-generated constructor stub
    
    }
    
    void test:: nexttest(){
        qDebug()<<"***********Next test*********"
    
    }
    test::~test() {
        // TODO Auto-generated destructor stub
    }
    

    error in the file namespace,

    here in file herder

    the namespace error

    /*
     * test.h
     *
     *  Created on: Apr 2, 2013
     *      Author: nksharma
     */
    
    #ifndef TEST_H_
    #define TEST_H_
    
    class test {
    public:
        test();
        virtual ~test();
         Q_INVOKABLE void nexttest();
    };
    
    #endif /* TEST_H_ */
    

    You have a space between the colon and the n in:

    void test:: nexttest()
    

    Another thiing, if you are using Q_INVOKABLE, you must declare Q_OBJECT in your front header file public:

     


    If you're still having problems, try to clean up the project with Project > clean...

  • How to generate a line in the report to calculate the total?

    Hello:

    I need help to generate a report. In an accounting report, I need to make the sum for each customer about the outstanding balance. The format of the report is the following:

    Invoice #, date of invoice, invoice, amount paid amount paid date, strike, sale

    Customer name: Baker Express / name of the debtor: Kurt Weiss inc.

    137308001, 18/04/2012, 438.07, 537.07, 05/06/2012, (99)
    137308002, 18/04/2012, 10, 100, 90, 05/06/2012

    ...

    customer Total: total payment: 627.07, total outstanding amount: (99)

    another pair of customer / debtor
    ...


    My question is how to generate the payment total and total outstanding balancefor each pair of client and the debtor. And there are several pairs. I tried to use Group by, but how do I display each tuple of invoice as well in the report?

    Any help would be appreciated.

    Sam

    One method would be to use the rollup in your SQL
    http://www.Oracle-base.com/articles/Misc/rollup-cube-grouping-functions-and-grouping-sets.php

  • I installed JZip and now I can not put my homepage of everything except the jzip search page. How to disable the functionality of jzip?

    I installed JZip and now I can not put my homepage of everything except the jzip search page. How to disable the functionality of jzip?

    See:

    To open the topic: config page, type Subject: config in the address bar (address) and press the 'Enter' key, as you type the url of a Web site to open a Web site.

    If you see a warning then you can confirm that you want to access this page.

  • How to enable the function keys beats again after the upgrade of the OS?

    How to activate the function of key Beats again after an upgrade of the OS which is Windows 7 Ultimate 32 bit, I use HP Mini 210-4000

    Stealth,

    The combination of bat function keys is

    FN + b

    as stated in your Quick Start Guide

    Chapter 1, Page 2

    The Guide:

    Beats Audio is an improved audio profile that offers a deep, controlled all low by maintaining a
    Crystal clear sound. Beats Audio is enabled by default.
    ▲ To enable or disable the Beats Audio, press fn + b.
    Select Start > Control Panel > hardware and sound > Beats Audio

    ---------------------------------------------------------------------------------------------------------------------------------------------------

    If you are having problems with the audio works as it should, you may have to (re) install the drivers from the website of your laptop.

    There are actually two different models in the category of 210-4000 Mini.

    Start here to the Support and drivers

    • Select the model entry that corresponds to your laptop.
    • Go to Software and Driver Downloads
    • Select your operating system (Windows 7, 32-bit), and then click "Next".
    • Scroll down
    • The Audio driver is the first category...
    • Download the package, pay attention to where it is saved.

    Given that you just upgraded (probably from Vista?), you may need to update some other software too.  Go through the different categories and see if you need / want any of the other packages.  Most of them can be added 'above' of what you already have on the system.  If you must delete something, the program will inform you when you try to install the new version.

    • If you have control of "Admin", we can highlight the package and "double-click" to install, if not right click, select "Run as Administrator" and install.

    For Audio driver... After you update / install the driver, reboot your computer.  After that, you should have your software Beats back.  If no joy yet, go back and get the software Quick Launch bar of your website (heading Software Solutions) and install it...

    Good luck!

    ----------------------------------------------------------------------------------------------------------

    Click on the star of white Kudos on the left to give Kudos for assistance.

    Please click "accept as Solution" to say the problem is solved.

    Always include: (Computer) product number , printer - model number ,.

    Never give your serial number

    ----------------------------------------------------------------------------------------------------------------

    2012 the year of the Dragon!

  • Qosmio G20 - how to enable the function keys

    Can someone tell me how to activate the function keys? I seem to be entirely invalid.
    Thank you
    Mike

    Hello

    In my opinion one of the important gift of drivers or utilities work and, therefore, you cannot use the FN keys.

    If your have installed XP on your test of the G20 to refresh the Toshiba common Modules.
    It is an essential tool that controls the FN keys.

    The common Modules can be downloaded from the page of European driver of Toshiba.

    Check it out.

  • How to disable the functionality of the hyper-threading technology

    How to disable the functionality of the hyper-threading technology

    Hello

    I put t know what BIOS you have, but generally you can activate or deactivate this option in the BIOS.

  • How to generate random numbers from 1 to 5

    How to generate random numbers from 1 to 5

    -1110340081

    Thank you I ended up

  • Default qualifier to "generate the function tree.

    Hello

    Since this is my first attempt to use the CVI feature for the creation of a Commission of an include file as I am facing a very basic question...

    My problem is that in the popup 'Generate the function Tree', I need to specify a default qualifier. So Far, however, I use no qualifier by default, because one) I didn't need and b) I provide 32-bit and 64-bit software versions. If I understand correctly, I have to choose for 32 bit __stdcall or __fastcall for 64 bit. In other words, a function panel will work for 32-bit or 64-bit programs? I guess it's a misunderstanding

    Furthermore, it should be to update the tutorial (from 2014?) to reflect actual contextual Control Panel CVI2013...

    You should be able to use the __stdcall in your code, regardless of the number of bits. When you build a 64-bit version of your code, this qualifier is ignored (it will use fastcall instead), but its presence is harmless.

  • How to generate a vector under LabVIEW?

    How to generate a vector as n = 0:Ts:T in LabVIEW with the need for the mathscript node and with out of the loop?

    Focus on the ramp VI model.  It is located in the treatment-> Palette generation of Signal of the Signal.

  • How to write a function block?

    Hello

    Someone knows how to write a function block with LabVIEW?  Something like those in real time live > function blocks >.

    Thank you very much in advance?

    Assuming you are referring to these specifically...

    http://www.NI.com/white-paper/7339/en/

    .. then the answer is that it is almost impossible to make a new. However, there is really nothing special all that to their topic. They are essentially normal subVIs (which you can learn about the other links) which just happened to have some terminals connected to shared variables. I personally would not normally recommend that anyway. If you could clarify what exactly you are trying to do, it might be possible to give more specific advice.

  • How to generate curves under labVIEW

    Hi all
    Can someone please tel me how to generate the following curves under LabVIEW.
    Haversine curve 1.)
    2 Lorentz curve.)
    3 bell curve.)
    4.) exponential rise curve
    5. exponential decay curve)

    Note: Entries required for this curves are Amplitude, Phase, Offset
    Frequency and number of samples

    Have you read the second part of my post above?

  • I use Windows 10 and use the Canon SX20 IS. How to use the function of Photo stich?

    I use Windows 10 and use the Canon SX20 IS. How to use the function of Photo stich?

    Is it possible to get the procedure to use feature stich photo?

    Will be Zoombrowser EX for windows 10 wotk?

    If any expert can guide me... that will be great.

    Hi Sat17,

    Thank you for your inquiry.

    For Windows 8 and beyond, ZoomBrowser EX has been replaced by EX. ImageBrowser

    Your software you will need to updated for Windows 10.

    You can access the software for your camera by clicking here.  Once on our site, scroll down to "Drivers and downloads", then use the drop down menu to choose "8.1 Windows" or "Windows 8.1 (x 64)".»  Your camera software has not been updated for Windows 10, but for Windows 8.1 software will run on your computer.

    To update your software, click the [Select] button to the right, then click on "How to download and install" for installation instructions.

  • How to find the function to remove the ink level

    Can someone please tell me how to find the function "for the removal of the ink level window" I need know when I use no to factory ink cartridges. I have Windows XP, but this is probably not important.

    Hi Laura,

    Find things such as ink levels is a function of the printer driver.

    This is provided by the manufacturer of the printer, and they are the best resource on the operation of their particular drivers.  Therefore, it is best to ask the manufacturer of the printer for advice on this issue.

    Sometimes, there is an icon in the taskbar that you can get this information.  Yet once, it is a function of the driver and the printer software.

    For reference:

    Check on a printer ink levels

    http://Windows.Microsoft.com/en-us/Windows-Vista/check-ink-levels-on-a-printer

    How can I check my ink or toner levels?

    http://Windows.Microsoft.com/en-us/Windows7/how-do-I-change-my-ink-or-toner-levels

Maybe you are looking for