How to find who attended and not
Hello worldCan I get help with this:
I have a main table that contain emp_id,
and I table of attendance.
SQL > desc attendance
emp_id
attend_date
entry_time
exit_time
I want to create the query to obtain the appearance of sysdate to sysdate-7, I would like to get information about attending and who did not attend.
for example:
emp_id, attend_date, entry_time, exit_time, status
----------------------------------------------------------
A001, 02/01/2013, 07:00, 16:00, this
A002, 02/01/2013, 08:00, 16:00, this
A001, 02/02/2013, 07:00, 16:00, this
A002, 02/02/2013, 07:00, 16:00, absent
A001, 02/03/2013, 07:00, 16:00, this
A002, 02/03/2013, 07:00, 16:00, this
A001, 02/04/2013, 07:00, 16:00, this
A002, 02/04/2013, 07:00, 16:00, this
A001, 02/05/2013, 07:00, 16:00, absent
A002, 02/05/2013, 07:00, 16:00, this
A001, 02/06/2013, 07:00, 16:00, this
A002, 02/06/2013, 07:00, 16:00, this
A001, 02/07/2013, 07:00, 16:00, this
A002, 02/07/2013, 07:00, 16:00, this
Note: the table of attendance does not record if the employee did not attend, that's why I want to get that out.
Kind regards
-- assuming its run for 7 days from '03/01/2013', this can be suitably parametrized
with date_range as (
select (to_date('01/03/2013','dd/mm/yyyy')-1) + level dt from dual
connect by level <= 7)
select dre.emp_id,
dre.dt,
att.attend_date,
case when att.attend_date is not null then 'ATTEND'
else 'NOT ATTEND'
end status
from attendance att,
(select dr.dt, mst.emp_id from date_range dr, mst) dre
where dre.dt = att.attend_date(+)
and dre.emp_id = att.emp_id(+)
order by dre.dt, dre.emp_id
EMP_ID DT ATTEND_DATE STATUS
---------- ------------------ ------------------ ----------
100 01/03/2013,12:00am 01/03/2013,12:00am ATTEND
101 01/03/2013,12:00am 01/03/2013,12:00am ATTEND
100 02/03/2013,12:00am 02/03/2013,12:00am ATTEND
101 02/03/2013,12:00am NOT ATTEND
100 03/03/2013,12:00am NOT ATTEND
101 03/03/2013,12:00am 03/03/2013,12:00am ATTEND
100 04/03/2013,12:00am 04/03/2013,12:00am ATTEND
101 04/03/2013,12:00am 04/03/2013,12:00am ATTEND
100 05/03/2013,12:00am 05/03/2013,12:00am ATTEND
101 05/03/2013,12:00am 05/03/2013,12:00am ATTEND
100 06/03/2013,12:00am 06/03/2013,12:00am ATTEND
EMP_ID DT ATTEND_DATE STATUS
---------- ------------------ ------------------ ----------
101 06/03/2013,12:00am 06/03/2013,12:00am ATTEND
100 07/03/2013,12:00am 07/03/2013,12:00am ATTEND
101 07/03/2013,12:00am NOT ATTEND
14 rows selected.
Tags: Database
Similar Questions
-
How to find corrupted files and remove them on mac i
How to find corrupted files and remove them on i mac? AM currently using OS x EL capitan 10.11.12 Mac said to run slowly and the recent upload did not work until the 3rd attempt.
Thank you
You do not have.
You can run this program and post the results so that we can see what you have installed that could cause your problems.
-
How to find who changed his mind?
Can we know how to find "* who changed a view given in the database? ' * ' as username, computer name, or same OS user name nay thing at least one of them, if not all.
When I checekd with
SELECT last_ddl_time FROM object where object_name =: object_name,.
I found his altered 5 days back.
Any help would be appreciated.
Thank you.Hi again: P.
The only way to do this is you has BEEN verified this point of view.
You can do this for next time by using the following procedure.
http://www.Oracle-base.com/articles/10G/Auditing_10gR2.php
Kind regards
Mario Alcaide
http://marioalcaide.WordPress.com -
How to print an attachment and not email itself. Please, I beg you.
How to print an attachment and not email itself. Please, I beg you.
Cool thanks HP
-
How to find the version and the arc of the installed Oracle client
Hi all
I have a sles 10 sp2 x86_64 on which customer oracle 10.2 is installed. This facility has not been made by me!
so I don't know how the oracle client version/architecture (32/64-bit) is installed on the client.
of sqlplus v I get only the version that is installed, and not if it is 32 or 64 bit. How can I find that.
sqlplus v
SQL * more: Release 10.2.0.1.0 - Production
with a little research on Google I found that the link that says 10g below client 32-bit cannot be installed on a 64-bit system.
I read this Client 32-bit installation on Linux x86_64 RDBMS software. [1075717.1 ID]
can anyone please shed more light on this?Installing 32-bit RDBMS Client software on x86_64 Linux. The only release of 32-bit RDBMS Client software that will properly install on an x86_64 Linux OS system is 11gR2 (aka 11.2.0.x) * 9iR2 (aka 9.2.0.x) 32-bit RDBMS Client software will NOT install on any x86_64 Linux OS system. * 10gR1 (aka 10.1.0.x) 32-bit RDBMS Client software will NOT install on any x86_64 Linux OS system. * 10gR2 (aka 10.2.0.x) 32-bit RDBMS Client software will NOT install on any x86_64 Linux OS system. * 11gR1 (aka 11.1.0.x) 32-bit RDBMS Client software will NOT install on any x86_64 Linux OS system. The answer to "why", is that the 11gR2 Client software is the first version that includes syntax so that a 32-bit object is linked.
Hello
PL see TechNote MOS:
* How to find if the Oracle Client Software is 32-bit or 64-bit platforms UNIX [434295.1 ID] *.Thank you
A H E E R X -
How to find the lock and more information why the prg conc taking too long
Oracle Apps R12-Orader management
Hi all
I am new to Oracle Apps, we I run my simultaneous program
its taking too long to complete. How to find that there is a lock to produce in the table while that simultaneous execution of the program, another way to find why the simultaneous program takes too long to run and how can you speed up the process.
Yesterday we made a few changes to speed up the process with our DBA to accelerate the simultaneous program
The first simultaneous program takes 2 h 30 and after these changes taking 1 h 45. Please suggest it's okay
Connected with the responsibility of the system administrator.
Manager - set - Manager of the standard.
Set the value of PROCESS like 15 (instead of 10).
Set the value of SECONDS of SLEEP as 10 (Changed from 30).
Manager - set - Manager2 Standard.
Set the value of PROCESS like 15 (instead of 10).
Set the value of SECONDS of SLEEP as 10 (Changed from 60).
Any suggestion on how to find why it takes too much time.
Any help is highly appricatable
Thanks and greetings
Srikkanth.MHello
I suggest you draw the simultaneous program and analyze the trace file. To do this, mark the simultaneous program as Trace enable (RESP system administrator, Menu simultaneous > program > define) and then run the program and download the trace file after dealing with tkprof. Check which are the staements who take most of the time and try to optimize them.
It will be useful.
-
How to find the utilities and windows drivers VGN-CR36G 8?
Hello
I use laptop Vaio VGN-CR36G with vista ultimate. Now, I want to install windows 8 enterprise edition.
But I can't find the drivers and utilities on the site of sony vaio.
But my product is compatible for windows 8 OS.
Here is the link below:
http://www.Sony-Asia.com/support/product/VGN-CR36G
Can someone please help me to download all drivers and software?
Thank you
Hi Whiteeasy.
This model does not support Windows 8 operating system which you can confirm from the link below.
If my post answered your question, please mark it as an "accepted Solution".
-
How to find the Maxima and Minima for each column of a 2D array?
Hello
I have a 2D chart and I would find the maxima and minima of each column of the 2-D table. Even though I know how to get maxima and minima for the whole picture but don't know how columnwise? Any ideas please?
Thank you
Rohit
Hello
@Smercurio-What you said is true, I should have shown using automatic indexing enabled which is really excellent choice. I just tried to show in a very simple way.
Anyway, here's the best way
-
How to find the audio and recording mixers
Cannot find Audio Mixers and recording in Windows 7 as I had XP
My Medion computer purchased recently does not appear to have full audio mixer for volumes or a similar mixer to record levels as I have already in Win XP.
Is it possible to reproduce pages of mixer teas? I would be grateful for any help on this problem.
TIA Mike
Cool Edit 2000 (compatibility issue)
Hello
The mixer similar to that of Windows XP volume has been removed in Windows 7.
Windows 7 has its own volume mixer. Check this link for more information:
Adjust the sound level on your computer:
http://Windows.Microsoft.com/en-us/Windows7/adjust-the-sound-level-on-your-computerCool edit 2000 is not compatible with Windows 7. Cool Edit was taken over by Adobe, a few years ago and renamed Adobe Audition. The manufacturer
offers a paid upgrade to the software.Check this link for more information:
http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/details.aspx?type=software&p=cool%20Edit%20PRO&v=Adobe&UID=2&pf=0&PI=
6 & s = Cool % 20Edit % 202000 & os 32-bit =Kind regards
Amal-Microsoft Support.
Visit our Microsoft answers feedback Forum and let us know what you think. -
How to find where VMDK and ISO mounted
VMware dear master,
I have trouble with my virtual environment,
1. when I need remove ISO file, it says that currently used. How to find where the ISO is mounted?
(manual search with see providing the edict for small environment is OK, but with vm 468 comments it is very complicated )
2. I need to clean my data store, I found a file with file 3 vmdk, how to find this vmdk mounted?
Thank you for your attention and support,
Kind regards
I would like to give a RVTools: RVTools - home
1. you should be able to use the vCD tab to find the ISO image in the device column (you can export to Excel and make a 'discovery' on the name of the file to facilitate this)
2. you can use the tab vDisk and search again on the path column.
-
How to find the maximum and minimum of a waveform between cursors
Hello!
Does anyone know an easy way to find the maximum and minimum of a waveform between two sliders?
Kind regards
Andreas
Hi Andreas,
attached, you get an example of it in MeasurementStudio.
-
How to show PieChart vertically and not horizontally?
Hello
As the title says, I hope that is there property or method or an event to display a chart areas vertically and not horizontally.
See you soon,.This is the soultion:
pieSeries.startAngle-= 4.7 * (180 / Math.PI);
-
Hi all
Looking a little nudge in the right direction on a strange problem with blocking locks in our database of BSE...
We occasionally will blocking locks in our EBS 12.1.3 database (11.2.0.4 CARS on OEL5). I can easily determine the INST_ID select and SID that keeps the lock with this:
Select final_blocking_instance, final_blocking_session from gv$ session where lockwait is not null;
and can use these results to find the specific object being blocked by querying a gv$ locked_object where session_id = xxx and INST_ID select = xxx. These sessions blocker are generally inactive to an event of "SQL * Net client message"-while they seem to be connected to the database users who need simply to commit or rollback transactions. Usually, when I see this type of behavior, the specific application involved in the unresolved external transactions is easy to find by taking the SQL_ID (or sometimes the PREV_SQL_ID) value of gv$ session and questioning gv$ sql. I can then use this information to better understand what users are trying to accomplish and help them understand what they need to change to avoid the deadlock problem.
But recently, we have integrated the add-on of Oracle content management and it seems to have added (I suspect indirectly) triggers for many forms EBS our users work in. Now that we know these "locks blocking inactive form" - and the SQL_ID value is zero and related PREV_SQL_ID sql_text is
SELECT * FROM AXF_COMMANDS_SYN WHERE FORMID =: b1 AND (MENUTYPE = 'SPÉCIAL' MENUTYPE or = "ZOOMANDSPECIAL") AND AXF_COMMANDS_SYN. SPECIAL 'n' IS NOT NULL
Although I can see SGS $ locked_object both the text of the SQL being run by sessions which blocked the blocking the locks held by the session is on an object (for example RA_CUSTOMER_TRX_ALL) that does not seem to be at all related to AXF_COMMANDS_SYN. The AXF schema has been added as part of the deployment of content management.
So, my thought is that a different cursor open (previous) held by the session is the real unresolved SQL that maintains the lock. Is there a way to determine the SQL_ID of this query "indirectly" from gv$ locked_object / gv$ transaction, gv$ open_cursor, etc.? I can determine what is the problem and what user, we need to talk to him - but I would really like to find the exact SQL that is involved. I am also to establish if the new behavior is somehow contributing to locking problems blocking or just 'a Kipper"- and I think I know which statement SQL Gets the lock will help me to move forward with the investigation. I'm sure I could find this info by tracing the blocking - session but the problem occurs rarely, and I'm not able to determine which trace session until it is too late... :-)
Any recommendations would be appreciated, and my apologies for the long post...
A session may issue a followed LMD of 5 requests without issuing a commit.
Another session may be attempting a DML when the 5th request session above is running. Querying V$ session for the first session SQL_ID or PREV_SQL_ID wouldn't you say the first SQL DML.
You can walk backwards through V$ ACTIVE_SESSION_HISTORY (if you have the License Pack diagnosis) and determine all SQL_IDs of this first session if they did get captured in V$ ACTIVE_SESSION_HISTORY or DBA_HIST_ACTIVE_SESS_HISTORY. (Attention: not all SQLs are captured - particularly short-lived SQLs can't get captured)
Hemant K Collette
-
WPSM54G cannot find print server and not able to print the test page
After several days of trial and error I am so far I'm willing to give up and put this peace of equipment for sale. It is my last attempt to find a solution.
I have a Canon MP510 printer connected to the print server and I managed to configure the print server so that it establishes a wireless connection to the router. I can see the ip address assigned to my router print server and I can log on to the configuration of the print server page.
When I want to set up your computer (software print copy of the Canon MP510 print server) I can not complete the wizard. Step 1 is successful. It shows the print server and the MP510 related to port 1, but in step 2, I get a message that the print server can not be found.
I looked on the forums how to solve. I already tried a fixed ip address to configure the printer manually but not any which solution worked.
Your print server must be set to a fixed IP address, try this IP address: 192.168.1.78... Disconnect ethernet cable between your router and the PS... Both devices power for one minute cycle... Follow the link here after changing the IP address on the PS...
-
How to find the lock and kill session in order to release it?
Hi all
EBS R12.2
"I met ' could not book record" in our case. How to release the session locked?
I usually do this by bouncing the apps & db level. Is their subtle way?
Kind regards
JC
Ideally, you should check for locks on the table in question where records are trying to access.
AFAIK, you must check the v$ locked_object and find sessions.
Hope this helps!
Kind regards
Hugues
Maybe you are looking for
-
Has the HP LaserJet Pro MFP M127fn for about a week for business, now will not print fax rec'd, shows message 'Memory Supply warning', how do I fix this, please help, thank you.
-
No phone number during the synchronization of Outlook contacts
During the synchronization of the contacts first time from Outlook to my Xperia Z3 Compact I get only the e-mail addresses in the contacts list. No phone number. Using PC Companion. What's wrong? How to solve it?
-
Remove white box in the green box of my photos.
While watching my pictuures, in Windows Explorer, I double clicked on a file in the elevator and, immediately, a green box with a white check mark or two white (?) rafters (?) covered the bottom 1/4 of the image. I wish I could get my hands around th
-
Cisco ipsec Vpn connects but cannot communicate with lan
I have a version of cisco 1921 15.2 (4) M3 I install vpn ipsec and may have customers to connect but cannot ping anything inside. A glimpse of what could be wrong with my config would be greatly appreciated. I posted the configuration as well as ru
-
Downloading Creative Cloud, my internet crashed
Downloading creative cloud, my internet crashed and the download failed.I now have a partially downloaded creative cloud that cannot be opened or uninstalled.Please can someone help?