Avoid Table a Table B time (min (time)) by the user name
I have 3 tables.event_table:
Unit Varchar2,
FirstTime Date,
LastTime Date,
SerialNumber Number,
UnitNumber Number,
Acknowledged Number
audit_table:
key Number,
userid Varchar2,
EntryTime Date,
Text1 Varchar2,
Text2 Varchar2,
Text3 Varchar2
name_table
userid
english_name
column_type
Each event record can have several audit for her table entries (it's a helpdesk package). I need to calculate the average time for someone to recognize an event. The difficulty is that they can recognize several times so I only need the first event_table.key (min). So I need search Text1, Text2, and Text3 for the word "recognize" so I need to recover the Entrytime with the lowest value for event_table.key for this series of events to audit (for registration of table of given event). THEN I need to subtract FirstTime in the min eventtable (event_table.key), EntryTime in the audit_table. Then I need to calculate and way recognize in time by the user.Here's what I got after several hours of work on it. (And several years of being afraid to try! But this group has shown me what is possible!)
SELECT
name_table.english_name,
MIN(audit_table.key) as jkey,
ROUND(AVG(86400*(audit_table.entryTime - event_table.FirstTime)) , 2) as "Blah"
FROM
event_table,
audit_table ,
name_table
WHERE
event_table.serial = audit_table.serial
and audit_table.userid = name_table.userid
and name_table.column_type = 'Ack'
and ( event_table.text1 LIKE '%acknowledged%' OR event_table.text2 LIKE '%acknowledged%' OR event_table.text3 LIKE '%acknowledged%')
and firsttime >= to_date('06/23/2009 17:00:00', 'MM/DD/YYYY HH24:MI:SS')
and firsttime < to_date('06/23/2009 17:40:00', 'MM/DD/YYYY HH24:MI:SS')
and lasttime < to_date('06/23/2009 17:40:00', 'MM/DD/YYYY HH24:MI:SS')
and event_table.acknowledged = 1
group by name_table.english_name, Round( (86400*(event_table.entrytime - event_table.firsttime)) , 2)
My problem is that I get each Userid several times. I want the average users recognize for the given period of time. So I need 1 entry per username and 'Blah' column requires to hold the AVERAGE of everything that users recognize time. Why can't I group by I want? I always have to put all fields in my ' group by '! Why can I not have the fields I want to in the report and group ONLY by 1 field I need to regroup by? This issue has caused me grief for quite awhile.I tried SEPARATE
The other question is why should I put that long «round...» ' statement ' group by '? Why can't I just put "blah"?
I also tried this (and again, I can't use blah... why?)
select name_table.english_name, ROUND(AVG(86400*(audit_table.entryTime - event_table.FirstTime)) , 2)
(
SELECT
name_table.english_name, ROUND(AVG(86400*(audit_table.entryTime - event_table.FirstTime)) , 2)
MIN(audit_table.key) as jkey,
ROUND(AVG(86400*(audit_table.entryTime - event_table.FirstTime)) , 2) as "Blah"
FROM
event_table,
audit_table ,
name_table
WHERE
event_table.serial = audit_table.serial
and audit_table.userid = name_table.userid
and name_table.column_type = 'Ack'
and ( event_table.text1 LIKE '%acknowledged%' OR event_table.text2 LIKE '%acknowledged%' OR event_table.text3 LIKE '%acknowledged%')
and firsttime >= to_date('06/23/2009 17:00:00', 'MM/DD/YYYY HH24:MI:SS')
and firsttime < to_date('06/23/2009 17:40:00', 'MM/DD/YYYY HH24:MI:SS')
and lasttime < to_date('06/23/2009 17:40:00', 'MM/DD/YYYY HH24:MI:SS')
and event_table.acknowledged = 1
group by name_table.english_name, Round( (86400*(event_table.entrytime - event_table.firsttime)) , 2)
)
But telling me just that event_table.firsttime is an identifier not valid! Even if is complete.Thanks for your time!
OK, sorry about that (had thought that an individual would be OK).
Maybe something like this:
SELECT nt.english_name,
ROUND(AVG(86400*(at.entryTime - event_table.FirstTime)) , 2) as "Blah"
FROM event_table et
JOIN (SELECT userid, serial,
entryTime,
ROW_NUMBER() OVER (PARTITION BY userid, serial ORDER BY entryTime) row_num
FROM audit_table
WHERE (text1 LIKE '%acknowledged%' OR text2 LIKE '%acknowledged%' OR text3 LIKE '%acknowledged%')) at
ON (et.serial = at.serial AND at.row_num <= 1)
JOIN name_table nt ON (at.user_id = nt.userid)
WHERE nt.column_type = 'Ack'
and firsttime >= to_date('06/23/2009 17:00:00', 'MM/DD/YYYY HH24:MI:SS')
and firsttime < to_date('06/23/2009 17:40:00', 'MM/DD/YYYY HH24:MI:SS')
and lasttime < to_date('06/23/2009 17:40:00', 'MM/DD/YYYY HH24:MI:SS')
and et.acknowledged = 1
GROUP BY nt.english_name
ORDER BY name;
This will give you the first entryTime by username and the series, and I have converted to ANSI syntax (find it more intuitive with inline views).
Edit
You can let me know how close or otherwise it is and I'll pick it up again tomorrow.
Tags: Database
Similar Questions
-
How to fill a table every time that the user login?
Hi people,
Can u please suggest me what can I do if I want a sequence to be put into a table to SAMPLE whenever the user's login in the forms.pls help me to reach the requirement above. I use forms with oracle 9i.
Concerning
VIDSwrite your code on the trigger after LOGON
or
You can write simple insert on the CONNECT button on your applicationBangoura
[My Oracle Blog | http://baigsorcl.blogspot.com/] -
Have not used my email in a long time and I forgot the user name and password
Hello. I don't use my thunderbird email in a long time and can't remember my user name or password if I remember my email address. How can I connect?
Your user name is all or part of your e-mail address.
The user name and the password is given with your email provider. You need to communicate with them.
Most providers have a password reset link on their page for help by e-mail. -
great, I try to load an app on the store, the message tells me that this can be done. I checked my account on my I Pad and it works.
When I reset my account, I get a message that I tried the user name or password too often.
any suggestions how to fix this?
Hi Monte Schwartz,
Thanks for posting your query on the Microsoft community.
Before give you the steps of troubleshooting on this, I would like to know some details about your problem.
- Is the issue with the app store or with any other app too?
- Are you a specific error code?
But you can always try some basic troubleshooting steps:
Method 1: Check the updates
Check if windows is up to date. If there are pending updates then please go ahead and install the updates and try to load the applications through the store.
You can use the link for additional help to install pending updates below:
https://support.Microsoft.com/kb/2777982?WA=wsignin1.0
Note: Also check the date, time and time zone of the system.
Method 2: Reset Windows Store cache
1. press Windows + R key.
2 type wsreset.exe. Press ENTER.
Method 3: Re-register Windows Store
I suggest you to re-register Windows App Store and check. Please follow the steps:
a. press the Windows key + X.
b. click prompt (run as administrator).
c. the administrator: command prompt window, type the following commands.
PowerShell - ExecutionPolicy Unrestricted Add-AppxPackage - registry DisableDevelopmentMode-$Env:SystemRoot\WinStore\AppxManifest.XML
Reference: http://blogs.msdn.com/b/notime/archive/2013/10/18/fix-store-app-in-windows-8-1.aspx
Note: Back up the registry before you edit it. Then you can restore the registry if a problem occurs.
Method 4: Run the troubleshooter of App.
The Apps store is an automated tool that we have developed to deal with a number of known issues that may prevent applications from running correctly. This troubleshooting automatically solves some issues including the suboptimal screen resolution, incorrect security or account etc. settings. You can click this link to download and run the utility of troubleshooting Apps.
http://download.Microsoft.com/download/F/2/4/F24D0C03-4181-4E5B-A23B-5C3A6B5974E3/apps.diagcab
You can try the above steps and get back to us if you need help regarding the same.
Thank you.
-
How to make a text field required at run time when the user clicks on the box?
I had a form, there are several checkboxes fields and the text associated with the check boxes. If the use clicks on the checkbox then partner
text fields should become mandatory. I tried the change event and the click event of the boxes. There is error in the onChnage event and I got some odd results in the click event on. Sometimes, if the user clicks the check box, then for the 1st time the field is not required, then the user onclicks the box and when the user clicks the check box for the second time the field becomes necessary, but if I turns off the option highlight the field and selects the field becomes necessary even if the user onchecks I am totally confused! To add that I have also written an incorrect code always I reached the goal? How it can be possible. I write the codes below, please help me because I am working under a deadline from the client.
onChange event:
var = this.boundItem (xfa.event.newText) newVal;
if(newVal == 0)
{
xfa.resolveNode ("form1. Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1'). validate.nullTest = "disabled";
}
on the other
{
xfa.resolveNode ("form1. Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1'). validate.nullTest = 'error ';
}*/For the onClick event:
var a = xfa.resolveNode ("form1..") RawValue Subform0.Subform1.Subform9.Subform10.Table48.row2.CostItemRecovere d_OnlyEnergyCharges");
App.Alert (a);
if(a == 0)
{
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck__L1_1").validate.nullTest = 'error ';
}
if(a == 1)
{
xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck__L1_1").validate.nullTest = "disabled";
}Please help someone!
Hello
You may need this resolved at this point, but here are a few tips.
An example of a loop in a dynamic array is here: Re: how to make invisible/visible or hidden columns with checkbox?
You are usually not necessary to resolve the nodes, especially when the script object is in the same table as the target objects.
For example if the table was not static your script could be simplified:
if (this.rawValue == "1") // this object is in Row2 { Row4.ComplianceCheck_L1_1.mandatory= "error"; ... }
However because you will be to loop through all the rows in the table repeatable instances / then you need to resolve the nodes. Take a look at the example above.
In your script, you have to Row8 Row4. I don't know if this is repeatable or just some of them. If we take Row4 as being repetitive, then you can apply the following to all repeatable lines.
var vRow4 = Table48._Row4.count; console.println("Row4: " + vRow4); // You can delete this or comment it out after testing
if (this.rawValue == "1") // this object is in Row2 { for (var i=0; i
I have not tested, but it should be close to work.
Good luck
Niall
-
To sort the list of files by time not the file name.
Original title: created the new toolbar on the sort option for changing the taskbar.
I created a new toolbar on the taskbar, and it is directed to a folder in my network. When I click the new button on the toolbar, it opens subfolders sorted by filemane. Then, open the sufolders with files sorted by filemane.
I want to sort the list of files per hour not the file name. is it possible to change this?
Here's what I did.
I right click on the taskbar - selected toolbars - selected new toolbar - selected the folder on my network.
When I click the double chevron right the new toolbar button, it opens the files in this folder, and then I select a subfolder and an another subfolder then the individual wave in this final folder files. There are more than 300 wave files in this folder. It sorts thenm by file name which is a randomly assigned file name by the used recording software. I want to sort the files by time instead of file name. is this possible?
Hi Jeffrey,.
How many computers are present in the network?
You can follow this link & check id the issue persists:
How to arrange files using folder views in Windows XP?
Hope the helps of information.
-
Hello, I have a windows mail account on my laptop and I also have an iphone. I registered my account companys on both laptop and iphone problem is when you configure receive it and send messages on mobile then you can not send screws iphone.
If you set up the password for the e-mail account on your iphone, it will stop and request your username and password on your laptop.
How is it possible to use both systems without having to login with user name and password every time?
Hoslo
Both could be "collision" in that they are both trying to access the mail server at the same time. Make sure that they do not check too often. Try to disable a device when checking with each other and see if that makes a difference. Also with WinMail, if you have a POP3 account, make sure that under Tools | Accounts | Mail | Properties | Advanced that you have configured to leave a copy of messages on the server, so the phone can bring too, that normally it will delete messages on the server when it downloads.
Steve
-
A database procedure call takes a long time, but the user is okay with it
Is there a way to show a progress bar to the user type WITHOUT use javabeans to indicate the State of a process of database? I think that there is a timer to a description, can someone show code example please.
The user is very though will be a process can take up to 10 minutes to run. (this is a batch routine treatment and involves many other procedures, etc. in the database to run)
I am running:
Forms [32 bit] Version 10.1.2.3.0 (Production)
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the options of partitioning and Data Mining
Oracle Toolkit Version 10.1.2.0.2 (Production)
PL/SQL Version 10.1.0.5.0 (Production)
Oracle V10.1.2.3.0 - Production procedure generator
PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
Query Oracle 10.1.2.3.0 - Production Designer
Oracle virtual graphics system Version 10.1.2.0.2 (Production)
The GUI tools Oracle Utilities Version 10.1.2.0.2 (Production)
Oracle Multimedia Version 10.1.2.0.2 (Production)
Oracle tools integration Version 10.1.2.0.2 (Production)
Common tools Oracle area Version 10.1.2.0.2
Oracle CORE Production 10.1.0.5.0Create an element whose width is 100%, changing the Visual properties to show it as a bar.
Show it on separate with a separate canvas window.
Create a procedure that:
-Change the length of your bar:
SET_ITEM_PROPERTY ('', WIDTH, * 100);
-Displays the window on the other side
SHOW_WINDOW ('');
-hide the window ifis greater than or equal to 100
HIDE_WINDOW (''); -
In the last 6 months + / _ my Comcast email not send mail as the smpt said that the name and the password not recognized. I can delete them both and then re-enter on my iphone and ipad, imac and it works again. It happens now 2 or 3 times each week. Comcast.com my website does not do this and can receive and send email without problem. Their support, explains what's happening with many of their apple using the client.
All the answers in the group. Has not happened before. This could be with apple's IOS dates as google is not not the case.
pdeyedoc
You should probably get a different email.
I know this isn't much of an answer or even very applicable but everyone I know eventually loses their emails from mobile provider or cable operator sends cause unless you stick with them forever, your account is deleted after you leave them.
Gmail, yahoo, rocket mail, and even AOL don't do that.
-
My password is saved, but everytime I open a new page on my company intranet, I need to confirm with OK prompt. Is there a way to skip this part?
Thank you!Have you enabled cookies and that your company's server allows cookies. If not, then nothing can be done. And make sure that the antivirus allows cookies stay and not remove them. There is also an option when the pop up comes having never for this site or similar to this one. Select this thing and problem solved
-
I went into options and set my homepage on the open gmail site but it does not always open when I run firefox
Have you checked the cookies exceptions?
You can control and manage permissions for all areas on the Subject: authorizations page via the address bar.
If you use a software like CCleaner cleaning then check the settings in the Firefox application.
-
MS Outlook 2010 client is disconnected each time, to request user name and password every time
Today we have faced problem with our Exchange Server 2010, some of our client not able to connect to the exchange server, and for most users
It is asking for user name and password to connect.Hello
Questions Windows is better suited in the Technet Forum.Exchange ServerThank you -
Hello
I implement a progressBar that has points. The status of a book. If the book contains 25 pages and user is on page 5 and then the ProgressBar shows 25 points and flashes the current point of the page. Here, for the flashing, I want the Bitmap to become field visible/invisible in a loop.
I tried TimerTask and Threads, but the application still gives me IllegaleStateException.
Please help as soon as POSSIBLE.
to access the event on a separate thread thread, you should use invokelater.
See
http://supportforums.BlackBerry.com/T5/Java-development/what-is-the-event-thread/Ta-p/446865 -
Hello
I have some doubts in regard to invoking an application third, whenever there is an incoming call (by observing the change in status of the phone). The third-party application must be called as soon as the user gets the call and must replace the appication of dial phone by default/native.
Please suggest me some ideas if the above can be implemented or not. If it can be put in place what is possible?
Also suggest me if there is another way to achieve this.
Thanks in advance,
Arun
Got the solution after enough research:
In Blackberry the substitution of native applications in is not possible. When there is a call that is a priority interruption that all applications are moved to the bottom and the phone call will be prioritized. When an incoming call is there is not possible to invoke the third about, we can take control as soon as the call is completed.
-
I have Windows 7 x 64 Pro on a PC to my home network 2-computer. Back up my files on a 1 GB network drive using outdated software. I would use the backup of Windows in the same way, but I'm stuck at the first step in backup: "what is my username and password?'." " I have no need to use either as well as single-user computers and log on automatically.
How can I convince backup W7 to accept that they are not needed? Otherwise how can I, with the status of administrator, either:
- check if there is an existing id/password?
- If necessary, set up a new id and password without harming my Autologon class?
Hi Hershmab,
Thanks for the reply.
The question that you are running in suitable for the forum on the link below.
http://social.technet.microsoft.com/Forums/en-US/category/w7itpro/.
Please report if you encounter a problem with Windows. I will be happy to provide you with additional options.
Maybe you are looking for
-
Whenever there is a major update of Mozilla (Foxfire?) something goes wrong with my Thunderbird e-mail account. This time I am not able to receive my email, although it seems that I can send it. I am able to see it on the server of the ISP, so it's s
-
How can I stop my email to appear on my desktop, when I open my computer
Whenever I get emails that they appear on my desk top as response or close how to stop this. I just want to open the e-mail folder and look for new emails
-
Remove an application from the start of the race
Hello I have an application that runs automatically whenever I start my PC and windows. And every time I have to spend time close because I do not use it. How can I prevent the application from running whenever I start windows? Thank you! Craig
-
How can I correct the spelling of the name of the file (or folder)?
I use Win 7. Accidentally, I mistyped a word of a folder title. I wrote the word with lower case rather than capitalize it. When I right click on the folder name and correct my bad typing the folder name becomes the word is spelled with lower case. S
-
EZ-TimeTrax software works not properly due to compatibility issues.
Original title: Timetrax I have the ez-timetrax software. It was working fine before, but now when I try to download the punches, it will start to download when it is at the end it just stops. He tells me how many punches are in the clock when I sta