SQL & PL/SQL :: Breakdown Sum Into Details?
Jun 18, 2013
I have to breakdown the sum of qty into each line as single piece ,as example below how to achieve this using sql as i am doing it using a procedure.
CREATE TABLE OT_CUT_ITEM
(
CTI_SYS_ID NUMBER,
CTI_ITEM_CODE VARCHAR2(30 BYTE),
CTI_LEN NUMBER,
CTI_QTY NUMBER
);
[code]....
output required is
CTI_SYS_ID CTI_ITEM_CODE CTI_LEN CTI_QTY
---------- ------------------------------ ---------- ----------
1 A 7000 1
1 A 7000 1
1 A 7000 1
1 A 7000 1
2 B 6000 1
[code]....
View 3 Replies
ADVERTISEMENT
Feb 1, 2011
Currently I have this in the employee table:
Employee_idStart Date(YYYMM)Term(months)Monthly Salary
1200801122000
220050562500
Is it possible to display the above information like this:
Employee_idStart Date(YYYMM)Term(months)Monthly Salary
1200801122000
1200802122000
1200803122000
1200804122000
[code]....
View 3 Replies
View Related
Nov 22, 2010
I have a user in my oracle database, I would like to know details such as, how many times and by using which tools same user has got logged for past one week.
How do I do that. I have sql which shows the current session either he is logged in, if so then which application or not logged in. But I required the information for past one week How do I get those details.
View 1 Replies
View Related
May 26, 2010
I want to save ip address, os username, terminal information at the time of record insertion/updation therefore I am using sys_context function but it gives me error at the time of form compilation.
ERROR:
ORA-00600: internal error code, arguments: [17069],[134386616],[],[],[],[],[],[]
My user has already DBA privilege.
View 12 Replies
View Related
Sep 25, 2011
I have one table which has two columns name,qty and it has data like arif,3 pcs i want to display it in 3 lines if the qty is 3 and in 2 lines if the qty is 2 using sql query
View 6 Replies
View Related
Aug 23, 2013
In our project we have many instance running with Oracle in one solaris zone. We are in the process of cost reduction so planning to bring the CPU in shared pool and reduce them.
if we can bring all the NUP (Named user Perception) CPU on one shared pool. Will it be cost effective and is there any problems in performing such change.
View 3 Replies
View Related
Sep 14, 2010
How can I find out a user session/connection details like ( his last connection time, his activity etc)
Here is the issue, a old dba_user_id who physically no longer exists is not removed from the database. At some time, a session is opened under his user_id and some activity runs and closes the session. So, checked scheduled jobs under him and disabled them. But not sure whether the scheduled jobs are creating a session under his user_id or some thing else.
I checked in v$session, but since I am not sure at what time his session opens, so I am not able to get his session details.
View 5 Replies
View Related
Aug 30, 2012
In AWR Report i found that there are few SQL queries that have full table scans how can we drill about this and find which table have full scan
yes with Explain plan we can do this but is there any other way in Oracle 11g
View 7 Replies
View Related
Mar 19, 2011
when the tables are updated, the following detals must be correct to ensure that the links in the affected tables are in place.
PLUPDATE_NEW(PLUP_SAVE_SEQ field value) must be the same with PLUPDATE_BENEF_NEW (PLUP_NEW_BENEF_SAVE_SEQ field value)
PLUPDATE_OLD(PLUP_SAVE_SEQ field value) must be the same with PLUPDATE_BENEF_OLD (PLUP_OLD_BENEF_SAVE_SEQ field value)?
[Code]....
i tried this code, what should i do in the link for this tables?
View 5 Replies
View Related
Feb 25, 2013
i want to display employees details when i am passing Deptno and that department employees only display in Oracle Forms
View 16 Replies
View Related
Apr 10, 2011
I have tables dynamically created with dynamic number of columns. There will be 7 columns that would always be fixed with their names and data types. They will always be last 7 columns.
way to write a select statement on those dynamic tables where only those known 7 columns are not selected and I need to select all the rest columns but leave the 7 columns names I know.
View 6 Replies
View Related
Sep 7, 2010
Under what userid(privileges) does a scheduled DBMS Jos run, is it under the same user that scheduled the job?
Does oracle internally log in(opens a new session) in order to run a scheduled DBMS Job?
some reference websites where I can get some details about how the scheduled jobs are executed?
View 2 Replies
View Related
Sep 29, 2010
When I execute my form, on pressing key F5 it displays the all available block names in the form. I want to restrict this.
View 5 Replies
View Related
Jun 7, 2012
I have three tables as shown in the image. Need to get the details of each employee in a single row..
EMployee_id BaseSalary Bonus Hike shares
View 4 Replies
View Related
May 19, 2011
Get following output using user_source(or other) view?
Package_nameProcedure_nameline_startline_end
ABCXYZ1022
In procedure_name column it could be any procedure, function name or any object name exist in package body.
View 6 Replies
View Related
Feb 14, 2013
We have a scenario where we need to get the details of quota details on different tablespaces for a user. Is there any way to get this information directly using some views etc.
I tried with following option.. but not found in this... i think we can get this TOAD some other tools. but i never tried using SQL directly...
SELECT dbms_metadata.get_ddl('USER','SCOTT') FROM dual;
View 4 Replies
View Related
Aug 15, 2010
Create a PL/SQL block that declares a cursor called DATE_CUR. Pass a parameter of DATE data type to the cursor and print the details of all the employees who have joined after that date.
DEFINE P_HIREDATE = 08-MAR-00
Test the PL/SQL block for the following hire dates: 08-MAR-00, 25-JUN-97, 28-SEP-98, 07-FEB-99.
I don't know how to pass parameters. So far I have this:
SET serveroutput ON;
DECLARE
p_HIREDATE DATE := 08-MAR-00;
CURSOR c_DATE_CUR(P_HIREDATE DATE) IS
BEGIN
OPEN c_DATE_CUR();
View 6 Replies
View Related
Dec 30, 2011
I have a problem I am making a rooster I want to increment dates. User will put input the first date then it have to incremented by user click i used Key_Next_item on Date Field.
if System.cursor_record >1 then
Doctor_Rooster_Details.Week_Date =:Doctor_Rooster_Details.Week_Date +1
Its gives me error on KeyNext_ITem of ORA
I have fields
Week_Date Day St_Time EndTime Available
01/02/2011 Friday 10:00 12:15 Y
I want to increment Week_date when user click on next record it will incremented. ST_Time, End_Time and available user will input that.
01/02/2011 Friday 10:00 12:15 Y
02/02/2011 Sat
View 4 Replies
View Related
Jan 16, 2012
I have a table in that i have some columns along with that four columns to capture the user details. but these details must be captured Programmatically.like whenever a user insert or update or delete his credentials must be captured in these columns. but i am not figuring out in which trigger i have to write and how.
View 19 Replies
View Related
Jul 28, 2012
i have two tables emp data emp course emp data the primary key is emp_no and another table emp course emp_no is foreign key and desgin master block and desgin details block master block programmed list of value to show the employee and make it database item = no details block show all data i want only save in the details block only how can make it
View 4 Replies
View Related
Mar 13, 2006
Developers they use Toad and in that they want to use session browser option so that they can see the SQL running and open Cursor,other session specific details...So what grant/ permissions can be given to them so that the Schema they logged on can access those information.
View 4 Replies
View Related
Jun 9, 2013
I want to link to blocks using description as there is no relation , for example i have two tables with one field in common called description, and i want to link this field in two tables using like operator.
create table item ( item_code varchar2(12),item_name varchar2(30));
insert into item VALUES('A','HEA160');
insert into item VALUES('B','HEA180');
create table stk (sl_item varchar2(12),sl_desc varchar2(30),sl_qty number);
insert into stk VALUES ('X','HEA160X1000',12);
insert into stk VALUES ('X','HEA160X2000',4);
insert into stk VALUES ('Y','HEA180X3000',10);
Suppose i click on item block item_desc with value on HEA160 all the items similar to that should appear in stk block like 'HEA160X1000' ,'HEA160X2000' , if i click on 'HEA180' on item then 'HEA180X3000' it should come.
View 1 Replies
View Related
Oct 15, 2013
I have a table like below:
EMP_ID MGR_ID EMP_NAME EMP_ROLE EMP_HIERARCHY
10 9 John Developer 7,8,9,10
9 8 Charlie Manager 7,8,9
8 7 Bruce GL 7,8
7 King CEO 7
20 18 Jack Developer 7,16,17,18,20
18 17 Adam Teamlead 7,16,17,18
17 16 Erik Manager 7,16,17
16 7 David GL 7,16
We can see that the for each employee, there is a corresponding Manager tagged except for CEO of the company. Now, I want the output to be like below
EMP_ID EMP_NAME EMP_ROLE MGR_ID MGR_NAME MGR_ROLE SUPERVISOR_ID SUPERVISOR_NAME SUPERVISOR_ROLE
Here, MGR_ID is nothing but the MGR_ID from the same row and Supervisor_id is nothing but the MGR_ID of MGR_ID
Ex:- For 10 EMP_ID, the MGR_ID = 9 and Supervisor_id = Mgrid of 9 i.e., 8
For 8, the Mgr_id = 7 and Supervisor_id = Mgrid of 7 which is none. etc.,
The same logic applies for Mgr_name, Mgr_Role , Supervisor_name and Supervisor_role too. I could not format the data in a tabular format due to some formatting issues.
View 12 Replies
View Related
May 20, 2011
I have a form which consist of three form
one is master and other are details
I take one value at master level in primary key at starting point at entry, which is passed to details table
i want to update value of primary key at the last save level
but erro fired child reocrd found
View 3 Replies
View Related
May 17, 2011
I got table alpha
CREATE TABLE alpha
(alpha_id NUMBER
alpha_cash NUMBER,
alpha_other VARCHAR2(20)
);
[Code]....
What is the best/a good way to display in alpha the total regarding the alpha_id ?
View 1 Replies
View Related
Oct 11, 2010
1.steps to create master-detail form using form builder 6i ,db oracle 9i.
2.Using dept and emp(database table)
3.one more thing difference between cascading/isolated while creating relation b/w dept and emp using join method
View 6 Replies
View Related
Jul 4, 2012
In details table i am having loc is column in which data is like this(Jones,180),(US,host name),(job, company),(id,0122)
output should be it should take only first value from ().
View 2 Replies
View Related
Mar 4, 2013
Get the highly paid two employees from each department with all details?
View 3 Replies
View Related
Nov 28, 2010
i want to ask, that in a master detail form, when a user enters few records in detail block against a master record, then when creating a new master record the form builder prompts to save the form first (with yes, no, cancel) option, if we hit no, the records in the detail block are washed away (while the master records remains)
is there any option that i can create several master records having associated detail records before saving them all at the end.
View 25 Replies
View Related
May 21, 2013
I deleted all my RMAN backup with delete backup command .but when i run query on v$rman_backup_job_details, show information, i don't know that v$rman_backup_job_details read data from where? and how to delete complete that v$rman_backup_job_details don't show any thing?
View 8 Replies
View Related