SQL & PL/SQL :: How To Choose First And Second Row Value

Jun 21, 2011

if i have table contains the following

r_nu record_s value time
1 11111 1 33904
2 30119 4 33904
3 70119 3 33904
4 11111 2 33904
5 20219 1 33920
6 11111 3 33920
7 50119 4 33935

if i want sql statement to select the first value of record_s and the second (both same value) and ignoring the rest

maybe to subtract its value from its second value

got it ?

so will choose
record_s 11111 and value 1
record_s 11111 and value 2
to do : value of second one - value of first one
2-1

View 3 Replies


ADVERTISEMENT

Forms :: How To Choose Tab In Focus

Oct 7, 2011

I have created a form in Oracle Forms 6i that utilizes a tabbed interface. Each section of the form has different modules to create a quote on the end page. As far as the logic goes, I have it complete. However, I would like to choose the tab that is in focus, and I can't find a place to change this in the property panel. What am I missing? I don't want it to focus on the last tab which is the totals page, when it should focus on the first page where you enter the data.

View 5 Replies View Related

Forms :: Choose Fields From Left

Feb 16, 2013

Is there any possibility of creating a selection interface similar to our report or forms wizard where user can select single fields or multiple fields together and when he clicks on the arrow those fields data to be inserted into another table.Please refer attachment.

--this is the main table
create table batch_item (batch_no varchar2(12),item_batch varchar2(12),total_batch_qty number);

insert into batch_item ('0001','a',300);
insert into batch_item ('0002','b',200);
insert into batch_item ('0003','a',102);

--after inserting the data i should be able to move this data to corresponding batches by manually selection and pushing them to a batch.create table ct_item (item varchar2(12),item_nm varchar2(20),item_qty number);

insert into om_item values ('a','alpha',2);
insert into om_item values ('b','beta',3);
insert into om_item values ('c','gama',4);

--left side is om_item and right will have batch items where batch qty will be accumulated upon choose arrows.

View 3 Replies View Related

SQL & PL/SQL :: Choose Explicit Cursor To Loop Through At Runtime?

Nov 1, 2011

Oracle Version: 11.2.0.2.0. I have two explicit cursors and I would like to choose at run time which one to run. Here is a simplified code snippet of what I am doing today:

DECLARE
CURSOR Cursor_A IS
SELECT * FROM EMP_A;
CURSOR Cursor_B IS
SELECT * FROM EMP_B;
RUNA CHAR(1) := 'Y';

[code]....

I want to avoid maintaining the same long list of transformations. I also want to avoid, if possible, an explicit FETCH INTO, because there are hundreds of fields in both tables. I'm looking for something like this (and I know this doesnt work):

DECLARE
CURSOR Cursor_A IS
SELECT * FROM EMP_A;
CURSOR Cursor_B IS
SELECT * FROM EMP_B;
RUNA CHAR(1) := 'Y';
CursorToRun IS REF CURSOR;

[code]....

View 4 Replies View Related

Choose Right Raid Level For Oracle Database

Aug 10, 2010

Tell me the right raid level for oracle database and why? The best companies that makes raid servers?

[URL].........

View 3 Replies View Related

How To Choose Best Stripe Size For A RAID10 Array - 10gR2

Oct 7, 2010

I have been studying possible ways to calculate the best size for the stripe size on my new storage. From what I have seen it appears that there is no straight answer but I believe there must be good way of estimating it. I am deploying a new storage that uses 16 x 600GB 15k RPM 6Gbps SAS drives, it is supposed to be very fast but I think if I get the stripe size on the RAID10 array right I should be able to get even more out of it. I am running oracle 10.2.0.4.0 (10gR2) on 64bit Linux with 32GB of RAM, the SGA is set to 20GB.

What I read said that the "stripe size must be at least as large as the I/O size." The I/O size is calculated from DB_BLOCK_SIZE * DB_ FILE_ MULTIBLOCK_ READ_COUNT, which is my case is "db_block_size = 16k * db_file_multiblock_read_count = 16 = 256k." The current RAID10 array that I am using which will be decommissioned soon has a stripe size of 128k, and if I understood it all correctly it is undersized for my Oracle instance.

With an I/O size of 256k the smallest stripe that I should choose is 256k but how do I know what is the best combination of db_file_ multiblock_ read_ count and db_block_size?

We are planning to create new table space with a block size of 32k as this has been recommended by a number of DBAs but with "db_block_size = 32k * db_file_multiblock_read_count = 16 = 512k".

Is this a viable size? Do you think this will actually improve performance on my system? Note that this database gets about 1500 insertions per second and peaks around 3000 insertions per second, it is a mixture of OLTP and data warehousing.

After doing a lot of research I came across an article by "Don Burleson" which says that starting in Oracle 10gR2 the "Oracle recommends not setting the db_file_multiblock_read_count parameter, allowing Oracle to empirically determine the optimal setting." References: URLs.....

View 5 Replies View Related

Memory Management - Choose Parameters For Server With A Fixed RAM?

Apr 18, 2011

the erelationship between sga_max_size,sga_targt,shared_pool_size,pga_aggregate_target and the server memory.

In short how shud i choose the above parameters for a server with a fixed RAM.

View 1 Replies View Related

Performance Tuning :: How Oracle Optimizer Choose Joins (hash / Merge And Nested Loop Join)

Oct 18, 2012

I want to know how the Oracle optimizer choose joins and apply them while executing the query. So that I will insure about optimizer join before writing any query.

View 2 Replies View Related

Forms :: Choose Lov In First Record That Won't Be Display In Second Record Lov

Sep 10, 2012

I have one multi record block in that i have one LOV..If i choose lov in first record that won't be display in second record lov...

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved