i have a customer table.
trans_id trans_date trans_amt debit_credit_indicator
001 01-JAN-13 1099 cr
001 12-JAN-13 500 db
002 24-FEB-13 400 db
002 23-MAR-13 345 cr
001 18-APR-13 800 cr
002 15-MAR-13 600 db
001 12-FEB-13 200 cr
i want like this output.
trans_id trans_amt debit_credit_indicator
i want get highest credit amount and lowest credit amount
and highest debit amount and lowest debit amount for each
i have a table like this. i want to output like this
c1 c2 c1 c2
1 10 1 10
2 20 2 30
3 30 3 60
4 40 4 100
5 5 5 105
c1 and c2 are columns in a table .i want output like this
c2 values are 10,10+20,10+20+30,10+20+30+40.10+20+30+40+5.
write a sql query.pls help this
i want urgent.
How well can multiple sessions access the same data
what are the methods using performance tunning in sql and
in oracle 10g sw after compiling procedure how to pass
parameter values ,if we (v_empid out number)how to give
empid after successful compilation program.This site exact
suitable for 10g with respect to question & answer same
format , im trying sql browser & sql command prompt using
exec procedure name & respective parameters.
1. is it possible to use the cursor atttibutes (%found ,%
rowcount , %isopen , %notfound ) to our user defined cursor
cursor cursor_name is select * from scott.emp
if you use...
cursor_name%found , %rowcount ,%isopen,%notfound...will it
2.what is the difference between the varray and index by
type type_name is table of number(8,3)
index by binary_integer;
first , last , prior , next ,trim are the methods we can
use it for the above type...simillary is there any way to
apply for cursors...
with thanks and regards..sarao...
what is the use of anchoring object? what r the difference
between anchoring object & enclosing object? can any one
tell me all the details?
create SQL (both DML/DDL) statements appropriate for the
creation of relational structures & constraints and other
objects for a given case study, the population of these tables
and the manipulation (querying/updating) of the stored data.
2. Create, develop and use the PL / SQL Program Units
Procedures, Functions as a progression towards Object Oriented
Relational Database Programming.
3. Package a collection of logically related Procedures and
Functions together to further move towards development of
Objects which reflect the principle of Data Abstraction whereby
only an Object specified in the Interface is accessible to the
4. Select, create, and use appropriate Database Triggers to
impose agreed specific constraints on a Database Table.
5. Provide a full and detailed evaluation which includes a
comprehensive test execution plan and its implementation for
each of the above.
Consider the following case study:
Perilous Printing is a medium size printing company that does
work for book publishers throughout UK. The company currently
has 10 offices, most of which operate autonomously, apart from
salaries, which are paid by the head office. Currently the
sharing and communication of data, is carried out using multi-
user networked access to a centralised RDBMS. Perilous Printing
jobs consist of printing books or part of books. A printing job
requires the use of materials, such as paper and ink, which are
assigned to a job via purchase orders. Each printing job may
have several purchase orders assigned to it. Likewise, each
purchase order may contain several purchase order items. The
following tables form part of the transactional RDB that the
office (office_no, o_addr, o_telno, o_faxno, mgr_nin) staff
(staff_no, nin, fname, lname, s_addr, s_telno, gender, dob,
position, taxcode, salary, office_no) publisher (pub_no,
p_name, p_city, p_telno, p_faxno, credit_code, office_no)
book_job (job_no, pub_no, job_date, job_desc, job_type,
job_status, supervisor_nin) purchase_order (job_no, po_no,
po_date) po_item (job_no, po_no, it_no, qty) item (it_no,
it_desc, amt_in_stock, price)
office contains details of each office and the office number
(office_no) is the key. Each office has a Manager represented
by the manager’s national insurance number (mgr_nin).
staff contains details of staff; the staff_no is the key. The
office that the member of staff works from is given by
publisher contains details of publisher and the publisher
number (pub_no) is the key. Publishers are registered with the
nearest office in their country, given by office_no, and they
are given a credit code that can have the
values “AA”, “AB”, “BB”, “BC”, “CC”, “CD” and “DD”. If a
publisher is to be deleted then not only the publisher’s entry
from the publisher table will have to be removed but all the
data associated with the particular supplier has to be deleted
book_job contains details of publishing jobs and the job number
(job_no) is the key. The publisher is given by the publisher
number (pub_no) and the supervisor for the job by
supervisor_nin. The job type can be either null or urgent;
whereas the job_status can be “ongoing” or “completed”
purchase_order contains details of the purchase orders for each
job and the combination of job number and a purchase order
number (job_no, po_no) form the key. Each printing job may have
several purchase orders assigned to it.
item contains details of all materials that can be used in
printing jobs and the item number (it_no) is the key.
po_item contains details of the items on the purchase order and
(job_no, po_no, it_no) forms the key.
In the above given database schema, descriptions are strings of
characters (at most 30 characters long), any dates (except the
job_ date) stored cannot be after the current system date, and
quantities and prices are assumed to be non-negative numbers.
What will be the output of the following
String S = 1+2+"abc" S = ?
String S1 = 1+2+"abc"+5+6 S1 = ?
how to find the First and Last Observation from the table:
Ex: OBS Name Sal Ans like: OBS Name Sal
105 E 5000--> 105 E 5000
102 B 2000 104 D 4000
103 C 3000
101 A 1000-->
104 D 4000
i have 2 table table one 4 columns respective values a1
7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values
a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same
then 4th column values 1)Qes diff >5 then print 5 * diff
value 2)Que diff <5 print 5
how to delete duplicate rows from a join tables(I have three
tables on that join)
how do you know which join is need to be used?
The select statement I have is:
WHERE gc_area_tec.id_skill_type (+) =
AND gc_technology.id_area_tec (+) =
order by gc_skill_type.skill_type asc, gc_area_tec.area asc,