get the time for each transaction
Hi Master,
Someone asked me a question.
I have a pl/sql block with multiple DML operations. How do you know how much time took each DML operation (not on a single table, tables different operations are underway in my pl/sql block)? Like this
Update statement
INSERT statement
Remove the statement
I replied like that... Use dbms_utility.get_time... If each statement how long it takes... We can easily find...! Once, he said... no I want to use predefined packages. DBA does not accept.
How can I fix this... Masters?
Please advise... !!!
Concerning
AR
DBA will no longer accept pkgs installation... !!
Create an account of RTO and defend his position to not use standard Oracle supplied packages, take the DBA.
Therefore, these packages should already be installed.
(Some essential element of the information seems to be missing).
Since no valid rationale was given for this crazy requirement (IMHO), the correct solution may possibly be: replace your DBA.
(I'd love to hear from experienced 'why' people, this requirement would be valid.)
MK
Tags: Database
Similar Questions
-
SQL query to get the items for which transactions have not been saved
Hi people,
Have a small doubt I want to compile a SQL query in the inventory where I get these items for what transactions do not have been recorded during a period of at least one specified number of days.
The days might be 30 days or 2 months depends on. If I want to get those items for which no transactions were reported for lets say 30 days. Could someone give me an idea of how to go about this thing? I use r12. I came up with the following query, but it gives a lot of records. The commented parts of this query is only commented on
SELECT DISTINCT msi.segment1,
MSI. Description,
MSI.primary_uom_code,
MSI.inventory_item_id
MSI mtl_system_items_b / *,.
mtl_material_transactions mmt * /.
WHERE / * msi.inventory_item_id = mmt.inventory_item_id
AND msi.organization_id = mmt.organization_id
AND NVL ((SELECT SUM (transaction_quantity)
OF mtl_onhand_quantities
WHERE inventory_item_id = msi.inventory_item_id),
0) = 0
AND TRUNC (mmt.transaction_date) < = SYSDATE - & D
AND * / NOT EXISTS (SELECT *)
OF mtl_material_transactions mmt
WHERE msi.inventory_item_id = mmt.inventory_item_id
AND msi.organization_id = mmt.organization_id
AND TRUNC (mmt.transaction_date) < SYSDATE - & D);
Hi fatimakhellil
Try the following code and mark it as correct if your problem be resolved.
SELECT DISTINCT msi.segment1,
MSI. Description,
MSI.primary_uom_code,
MSI.inventory_item_id,
MSI.organization_id,
Ms.secondary_inventory_name,
(select max (transaction_date) in the mtl_material_transactions where msi.inventory_item_id = inventory_item_id
AND msi.organization_id = organization_id) last_transaction_date
OF mtl_system_items_b msi.
Ms. mtl_secondary_inventories
WHERE ms.organization_id (+) = msi.organization_id
AND msi.source_subinventory = ms.secondary_inventory_name (+)
AND NOT EXISTS (SELECT *)
OF mtl_material_transactions mmt
WHERE msi.inventory_item_id = mmt.inventory_item_id
AND msi.organization_id = mmt.organization_id
AND mmt.subinventory_code = ms.secondary_inventory_name
AND mmt.organization_id = ms.organization_id
AND TRUNC (mmt.transaction_date) BETWEEN TRUNC (SYSDATE - & d) AND TRUNC (SYSDATE))
-
Get the Parent for each record in the child
Dear Experts,
I have a table that contains the parent and child information. I need to make a request to get the parents of each book of the child table. I tried to write the query but does not get the expected results. Please help me.
Table: relationship
Parent of the child
102 101
103 102
104 103
106 105
107 106
109 108
110 109
Output:
Expected child
102 101
103 102; 101
104 103, 102, 101
106 105
107 106; 105
109 108
110 109
Thank you very much
Hello
MU * 443499 * TR wrote:
Dear Experts,
I have a table that contains the parent and child information. I need to make a request to get the parents of each book of the child table. I tried to write the query but does not get the expected results. Please help me.
Table: relationship
Parent of the child
102 101
103 102
104 103
106 105
107 106
109 108
110 109
Output:
Expected child
102 101
103 102; 101
104 103, 102, 101
106 105
107 106; 105
109 108
110 109
Thank you very much
Why do you want to
Expected child
----- ---------------
110 109
Instead of
Expected child
----- ---------------
110 109; 108
?
You may want something like this:
CONNECT_BY_ROOT SELECT AS children
SYS_CONNECT_BY_PATH (parent, ';') AS expected_output
FROM table_x
WHERE CONNECT_BY_ISLEAF = 1
CONNECT BY child = parent PRIOR
;
If you would care to post CREATE TABLE and INSERT statements for your sample data, and then I could test this.
-
How to measure the time for each mapping?
I use oracle11g with OWB.
I have several mapping and each dimension tables to update the mapping.
I want to measure how long it takes to complete each mapping. What is the best way to find the total time for each mapping.
One way is, we can have POST MAPPING and PROCESS of MAPPING PRE. I can trigger the stored procedure to enter the start time and the end time of each match. On this basis, I can calculate the total time for each mapping. But I have 50 mapping. Now, I need to write 50 different stored procedure and open the POST-PROCESSING of the MAPPING and PROCESS OF MAPPING of the PRE for each mapping. It is complex.
Is there another way, we enter the total for each mapping of execution? Y at - it that no data in OWF_ MGR dictionary can help on this?
I would be grateful if someone can help me on this.He will remain forever unless you purge it explicitly.
See you soon
Katia -
How to set the time for each slide in the slide show?
Length of blade, pan and zoom, melted chained, etc. is adjustable for each slide or have all the same?
If they can be individualized, what I don't see.
Use Lightroom CC 2015.
Thank you
Leo Sopicki
These features are not in the Lightroom Slideshow module. You will need to use another third party software to create these types of slideshows.
-
My Inbox to view the sender for each message and now it does not work... How do I get it back to where it was?
Right-click on the header at the top of the list of messages and select from the list of options.
-
For the last week or three Firefox updates two or three times for each update. Sometimes it refreshes without obvious reason. For example, I'll be in the middle of typing in the message forum block & it refreshes. Or by filling out an online form. Or simply viewing a page.
You can check for problems caused by an extension that is not working properly.
Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).
- Do NOT click on the reset button on the startup window Mode without failure.
-
Hi all
I have a requirement where I need to get all the records, for each record in double, I need to get a single column with null or 0.
create table a1
(
Identification number,
VARCHAR2 (100), the point
part varchar2 (100));
Insert into a1
values (1, 'ABC', 'A1');
Insert into a1
values (2, 'DEF', 'A2');
TABLE A
PART ITEM ID
1 ABC A1
1 ABC A1
1 ABC A1
DEF 2 A2
DEF 2 A2
3 DEF A2
O/P
PART ITEM ID
1 ABC A1
1 ABC 0
1 ABC 0
DEF 2 A2
2 DEF 0
3 DEF 0
Thanks in advance.
Thanks for your help FrankKalush...
This one will work.
WITH got_r_num AS
(
SELECT NVL (a1.id, a1.id) as id
NVL (a1.item, a1.item) AS element
NVL (a1.part, a1.part) IN the framework
a1.id AS a_id
ROW_NUMBER () OVER (PARTITION BY a1.id
ORDER BY NULL
) AS r_num
BY the a1
)
SELECT id
element
CASE
WHEN a_id IS NOT NULL
AND r_num = 1
THEN part
ELSE ' 0'
END in the framework
OF got_r_num
;
-
How to get the date for the first Monday of each month
Dear members,
How to get the date for the first Monday of each month.
I wrote the following code
SELECT decode (to_char (trunc (sysdate + 30, 'MM'), 'DAY'), 'MONDAY', trunc (sysdate + 30, 'MM'), NEXT_DAY (trunc (sysdate + 30, 'MM'), "LUN")) FROM DUAL
But he looks at complex bith.
Abhishek
Published by: 9999999 on 8 March 2013 04:30Use the IW format - it will make independent NLS solution. And all you need is truncated 7th day of each month using IW:
select sysdate current_date, trunc(trunc(sysdate,'mm') + 6,'iw') first_monday_the_month from dual / CURRENT_D FIRST_MON --------- --------- 08-MAR-13 04-MAR-13 SQL>
Here is the list of the first Monday of the month of this year:
with t as( select add_months(date '2013-1-1',level-1) dt from dual connect by level <= 12 ) select dt first_of_the_month, trunc(dt + 6,'iw') first_monday_the_month from t / FIRST_OF_ FIRST_MON --------- --------- 01-JAN-13 07-JAN-13 01-FEB-13 04-FEB-13 01-MAR-13 04-MAR-13 01-APR-13 01-APR-13 01-MAY-13 06-MAY-13 01-JUN-13 03-JUN-13 01-JUL-13 01-JUL-13 01-AUG-13 05-AUG-13 01-SEP-13 02-SEP-13 01-OCT-13 07-OCT-13 01-NOV-13 04-NOV-13 FIRST_OF_ FIRST_MON --------- --------- 01-DEC-13 02-DEC-13 12 rows selected. SQL>
SY.
-
How to get the time of browser in the project template
Hello
With Jdev 11.1.2.3
How can I get the time to browsers in the model project?
Groovy accesses the browser time?
I have to do some calculations (based on the time of the browser) for each row returned by a query. I think it would work if I could get time to groovy browser because I was able to perform the calculation in the SQL of my View object.
But I can't seem to find how to get browser in Groovy times? Any ideas?
The other option, is to use JavaScript to get the date of the browser, that should work, but the lines are displayed from a query in an AF:table, I need to apply the calculation to set the color of the table date field based on the calculation of date browser. So a java method should run for each row returned and displayed in the table.
What senses seem to better you experts? I seem to be in a catch 22 here... Any ideas? And there are items that you can reference?
Thanks for the help.
Published by: 966952 on March 11, 2013 05:41As I said, you can set the inlinestyle of the field you want to change the background of a method of bean that return a style as appropriat
// Bean code: the bean is set as requestScope bena in adfc-config.xml import javax.el.ELContext; import javax.el.ExpressionFactory; import javax.el.ValueExpression; import javax.faces.application.Application; import javax.faces.context.FacesContext; public class TableInlineStyleBean { public TableInlineStyleBean() { super(); } // get a value private Object getValueExpression(String name) { FacesContext facesCtx = FacesContext.getCurrentInstance(); Application app = facesCtx.getApplication(); ExpressionFactory elFactory = app.getExpressionFactory(); ELContext elContext = facesCtx.getELContext(); ValueExpression lCreateValueExpression = elFactory.createValueExpression(elContext, name, Object.class); return lCreateValueExpression.getValue(elContext); } public String getCalculateStyle() { //use expression from table or any other EL to do the calculation String val = "#{row.CommissionPct}"; Object obj = getValueExpression(val); String color = null; if (obj != null) { Number n = (Number) obj; // return red as background if CommissionPct > 0.2 if (n.floatValue() > 0.2) color = "background-color:Red;"; } return color; } }
And in the af: table a column (for example CommisionPct)
Timo
-
Hi all.
How can I get rank with MIN time (DESPITE DAY) (for the first six hours 08:00-14:00, AND the NEXT 6 hours 14:01 to 20:00)
If what follows is my sample
my result should be at first six hours 07:00 and 17:00 followed by six)03/05/2012 17:30:00 04/05/2012 17:00:00 10/05/2012 18:00:00 12/05/2012 08:00:00 10/05/2012 07:00:00 03/05/2012 11:00:00
Thanks in advance for any helpPersonally, I do not like to convert dates into strings and vice versa. I think that both arithmetic and precise the date date would perform better.
Here's an alternative:
with t as ( select to_date('03/05/2012 17:30:00','DD/MM/YYYY HH24:MI:SS') as dt from dual union all select to_date('04/05/2012 17:00:00','DD/MM/YYYY HH24:MI:SS') from dual union all select to_date('10/05/2012 18:00:00','DD/MM/YYYY HH24:MI:SS') from dual union all select to_date('12/05/2012 09:00:00','DD/MM/YYYY HH24:MI:SS') from dual union all select to_date('10/05/2012 08:30:00','DD/MM/YYYY HH24:MI:SS') from dual union all select to_date('03/05/2012 11:00:00','DD/MM/YYYY HH24:MI:SS') from dual ) select to_char(min(dt) keep (dense_rank first order by dt-trunc(dt)), 'HH24:MI:SS') hh24miss from t group by trunc((extract(hour from to_timestamp(dt))-2)/6) order by 1; HH24MISS -------- 08:30:00 17:00:00
Explanation:
-Use the EXTRACT function to get the time. The date must be "converted" in a timestamp date because ANSI does not have the component "hour".
-Subtract the difference of two hours from the time. This will change the interval from 2-8 to 0-6, 8-14-6-12, etc.
-Divide by 6 and truncates the result. This will give 1 what it is from 08:00 to 13:59.59 hours.
-Group by this result, which will all split into groups of ranges of 6 hours.-Now, in each group, so the component "hour": TRUNC (DT) is the date with time set to 0, DT - TRUNC (DT) is the component "hour".
-Ordering by the component "hour", download the first date that corresponds to the first component of the time.Published by: stew Ashton on November 16, 2012 17:38
-
Hi everyone, this is my first post, also help on the post would be appreciated.
I bought ipad air 1 after that 2013 but can not get the pages for free. Numbers and imovie I can. IOS9 running at the moment. I have pages when I connect on icloud on my pc. Can I transfer iPad app, because it is not in the ILO purchased in itunes.
Thanks in advance
Newbie
The only way to install an ipad app is through the app store. PC or Mac software does not run on the ipad. Search in the contacts link at the bottom right of this page. Give apple a call.
I guess is the icon for pages in icloud for storing documents pages. At the same time, apple had a cloud based pages. Not sure what happened to her.
R
-
You are looking for the block CD build based on the time for MPC simulation.vi
Hello everyone! I'm trying to implement MPC in LabVIEW. I downloaded some code that shows the implementation. My question is in these codes that I see a named block as CD build based on the time for MPC simulation.vi. I tried to find a lot of this block, but I could not... Can someone help me with the problem (exactly under what section I get this block) or can someone tell me how can I give the profile of setpoint for the problem of simulation MPC?
The associated screws to generate the profile found in:
C:\Program Files (x 86) \National Instruments\LabVIEW 2011\vi.lib\addons\Control Design\_MPC\Reference profile
or
C:\Program NIUninstaller Instruments\LabVIEW 2011\\vi.lib\addons\Control Design\_MPC\Reference profile
You can look at examples of:
C:\Program Files (x 86) \National Instruments\LabVIEW 2011\examples\Control and Simulation\Control Design\MPC
C:\Program NIUninstaller Instruments\LabVIEW 2011\examples\Control and Simulation\Control Design\MPC
to check the use of these screws
-
4540 proBook s: can I get the drivers for windows 10 for my probook 4540 s
Can I get the drivers for windows 10 for my 4540 s probook
Windows 10 will include more if not all the necessary drivers, just installed on a HP PC and has each of them with the exception of the guard hard drive software, if one is missing in Device Manager, Windows 7 drivers should work.
-
Can anyone help please. I used to be able to get the symbol for the pound Sterling by pressing ALT and 0163 at the same time, maybe you'll know
That's how you used to make the binary code on non-electric machines punch original card. This will make me sound old?
It's very frustrating that nothing bought here in Spain is not consistent with the rest of Europe, it is purely for the Spanish market. I need to use this and other symbol that don't appear on my keyboard, but it is very - very sensitive touch and I think I must have hit another function key for stopping this work but can find nothing written on the computer and the manual was not in the box. as usual.
Please let know us if possible thank you.
Start > all programs > Accessories > system tools > character map
http://symbolcodes.TLT.PSU.edu/accents/Charmap.html
You can drag the key and drop it in your report or use the code indicated in the bottom right of the application
Key codes Alt Windows
Maybe you are looking for
-
We have a time Machine that is inadmissible for automatic backups. I use a MacBook Pro (2012, 16 GB RAM, 500 GB SATA drive) with OS X El Capitan v. 10.11.5. The backup of a now-dead Mac is also on the Time Capsule. I get a: "/ Volumes/data/users of M
-
I spoke with tech support at school and they said that I can't look at their website with Firefox4 or Internet Explorer 9. Where can I get an older version of Firefox to. thanks
-
program change install for all users to a single user
Hi, without having to reinstall, is it possible to change a programs install the option to all users for the current user? I installed yahoo messenger on our server and installed mistakingly for all users, now it opens to everyone who connects, when
-
Hi all I wrote a vi to the continuous monitor the sound from the microphone. I found the stop signal after some time and then program also cannot stop/close normally. No error message displayed after the fact, someone knows what's the problem for him
-
change a user settings an administrator setup for windows vista windows
in windows Vista, how to change a user settings an administrator setup for windows vista windows. In the CMD window, I tried running the disturbance of disk of my user ID, he comes back and says it must be run by an administrator. When I log on as an