SQL & PL/SQL :: Apply Divide And Conquer Approach On Field Value

May 4, 2010

I want to apply divide and conquer approach on the field value, For example I have the field value like this

Value
32,36,12,65,85,9663
43,36,89,65,112,9663
36,63,12,65,95,123
32,36,12,85, 85,9663

Remember that these value are taken from ONLY one field i.e Value. Apply the divide and conquer approach in such a manner that take the value of a single field and each row and divide the value into two half. Continue this process until single value until we reach the single value or single sub problems.

Apply the divide and conquer approach on all the value of field. When we get final value then match the value of two different rows. And check how much field value are similar (match or duplicated). If field values are match more then 80% then delete the duplicated value and keep the original entity.

View 39 Replies


ADVERTISEMENT

Upgrade :: Migration Without Downtime - Goldengate Approach

Mar 24, 2013

We are facing a project where it is mandatory that the migration (from 9i to 11g) happens without any downtime. We thought about using Goldengate do to this migration. But i would like to listen to somebody who already did such kind of migration (i never used goldengate before). The basic steps to do such migration would be:

1) Install the Goldengate client on both source and target
2) Export only the metadata (structure of the table, for example) from source to target (here is one point of doubt of mine. This export can be only done using exp/imp?)
3) Perform the initial load from source to target (here i have another doubt: It it possible to perform an initial load from a whole database?)
4) Configure manager, export and replicat to perform the migration with the source database open in read-write

With the steps above, would i be able to perform a migration without downtime? What other considerations do you have?

View 1 Replies View Related

SQL & PL/SQL :: Divide One Of Column Value With Other As Duplicate

Feb 6, 2012

below are the create and insert statement, making duplicate row, i mean In table emp_detail, we have row like

ENAMEJOBDEPTNODETAIL
RAJ CS 10 RAJ IS IN CARE OF ROHIT

We need to insert the same record but divide the last column value on the basis of "IN CARE OF" any word after this should come in next new row with the same value for all other column, like

ENAMEJOBDEPTNODETAIL
RAJCS10RAJ IS IN CARE OF
RAJCS10ROHIT
CREATE TABLE "EMP_DETAIL"
("ENAME" VARCHAR2(10),
"JOB" VARCHAR2(9),
"DEPTNO" NUMBER(2,0),
"DETAIL" VARCHAR2(100)
[code]...

View 3 Replies View Related

Reports & Discoverer :: Divide Row To Same Fields

Jun 28, 2011

i want to divided report to same fields such as

above
account_no , account_name , account_date
120 industry 1-1-2010

middle
account_no , acccount_name , account_date
121 medical 1-1-2009

bottom
account_no , account_name , account_date
122 financial 1-1-2008

View 11 Replies View Related

SQL & PL/SQL :: Divide Sting Into Small Strings

Aug 7, 2010

I have a string:

"This is just for testing 123.
This is just for testing 45654.
This is just for testing 5567876.
This is just for testing 53456547.
This is just for testing 123423.
This is just for testing 98090.
This is just for testing 099473.
This is just for testing.
This is just for testing.
This is just for testing 3.
This is just for testing 34983245983.
This is just for testing 6432."

I need to divide this sting after every 100 characters, as the length of column to insert is 100. And i do not want to modify the column as it has great impact. I need to divide the string, such that it should be less then 100 characters also the string is not cut in between.

like:
first string: "This is just for testing 123.
This is just for testing 45654.
This is just for testing 5567876."

then 2nd string: "This is just for testing 53456547.
This is just for testing 123423.
This is just for testing 98090."

then 3rd string: "This is just for testing 099473.
This is just for testing.
This is just for testing.
This is just for testing 3."

View 6 Replies View Related

PL/SQL :: Oracle 10.2.4.0 - How To Divide Set Of Records Into Groups In SQL

Jun 11, 2012

I am using 10.2.4.0 of oracle. I am having one requirement, in which i have to divide the set of records into certain groups , so that they can be executed partly but not in one run.

So in the 'SELECT' clause itself i want to assigns particular value (may be 1 )to first 50000 records then another value(may be 2) to next 10000, like wise. And again the total count of records will also varry time to time , if the total count of record set is less than 10000 , then it should only assign '1' to all the records. i will set the group values (1,2,3...) as another column itself.

View 4 Replies View Related

Reports & Discoverer :: Discoverer Divide By Zero

Mar 11, 2007

I am using Oracle Discoverer Plus and I have some columns in the database table that periodically take the zero value. I have to use that column to divide other values. Is there any way I can handle this to show "0" when it is divided by zero?

Discoverer Plus shows that PL/SQL functions can be used in calculations. But I can't find the Register PL/ SQL function option in the Tools menu.

View 6 Replies View Related

Server Utilities :: Field In Datafile Exceeds Maximum Length For Number Field?

Apr 23, 2010

Even though i am using COL1 CHAR(500) NULLIF COL1=BLANKS, then also i am getting same error for those columns.

View 13 Replies View Related

CPU Patch Apply

Jun 17, 2012

Does we need to apply the patches in sequence. i installed oracle 11g r2 today only, then which patch i can install. if i like to install CPU, then does i need to install all the previous or only the latest one. if only latest one only, then how can i find the CPU patch number.

of course, instead of cpu i can install psu patch, then which one has to install. only latest one or all previous also. if latest one only how to find latest psu patch that has to apply.

View 4 Replies View Related

Forms :: Update Field Based On Another Field Checkbox

May 3, 2013

I have a table where i need to update one field values based on another field of the same table , simply as it is.I have done this using one select all check box , on clicking that all check boxes of item_trans table will get selected , then i will un select some of check box and then using one button, i will update the value of the fields which are checked only.

I have put the sample code but when i am updating its taking long time and hanging.I am also attaching the form based on the test case provided.

--tables with insert statement
create table item_trans (trans_item varchar2(12),trans_qty number,trans_act_qty number)

insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE1',40,NULL);
insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE2',20,NULL);
insert into item_trans(TRANS_ITEM,TRANS_QTY,TRANS_ACT_QTY) VALUES ('TREE3',20,NULL);

--i want to set the value of trans_Act_qty as trans_qty

--i create one dummy or test block to keep the select all check box. for that table test script is

CREATE TABLE TEST
(
C VARCHAR2(2000 BYTE),
B NUMBER,
A NUMBER
);

insert into test (C,B,A) values ('A',1,1);

--code written in select all check box which is created on test.block.

BEGIN
GO_BLOCK('item_trans');
FIRST_RECORD;
LOOP
:M_END_YN := :M_END_ALL;
[code].......

--code written in M_END_YN ( actual check boxes where i will uncheck).

IF :M_END_YN = 'N' THEN
:M_END_ALL := 'N';
END IF;

--code written on button to update those values which are checked.

BEGIN
GO_BLOCK('item_trans');
FIRST_RECORD;
LOOP
IF :M_END_YN = 'Y' THEN
[code]......

View 5 Replies View Related

How To Enable And Disable A Field Dependent On Another Field In Apex

May 9, 2013

I am New to Apex. Im using Apex Version 4.2.

I have a tab named APPROPRIATIONS it has 10 fields. Among which is PROJECT NUMBER, AUTHORIZAION DATE (CALENDER TYPE POPUP), And FUNDS CHECK FLAG.

The Scenario is depending upon PROJECT NUMBER the Fields are Populated including FUNDS CHECK FLAG .

But the AUTHORIZAION DATE is a MANDATORY field has to be filled by User

The Requirement is to make AUTHORIZAION DATE as MANDATORY only when the FUNDS CHECK FLAG is *"BLANK "* or *“Y”*

If the FUNDS CHECK FLAG is *“N”* then the AUTHORIZAION DATE to be made OPTIONAL.

View 2 Replies View Related

How To Apply Patchset With No Downtime

Sep 20, 2012

How to apply patchset (10.2.5) with no downtime?

My db version is 10.2.4 and OS is hp-ux

View 10 Replies View Related

Update Field With 1st 9 Characters Of Another Field In Same Record?

Apr 23, 2009

I need to update a field with the 1st 9 characters of another field in the same record.

View 1 Replies View Related

SQL & PL/SQL :: Updating A Date Field With Field From Another Table?

Nov 14, 2011

I have a table called Customer_Type with following fields

Customer_type ,Active_date, Inactive_date
regular,11/01/2011
daily,11/04/2011
monthly,11/05/2011/11/11/2011

Tbale 2:Customer

Customer_name,Customer_type,Customer_Inactive_date
John,regular,
James,monthly,
Jake,daily,
Jill,monthly

What i wnat is to update the Customer_inactive_date with the Incative_date field from Customer_type based on their Customer_type... So james and Jill would have their rows updated in this scneario ..How can i achive this in pl/Sql

I have teh code using merge function..I want something in traditional old fashion..

The sql statements are below

CREATE TABLE CUSTOMER_TYPE
(
type_code VARCHAR2(10),

[Code]....

View 5 Replies View Related

Migrate Database To Linux And Apply Inc Changes Afterwards

Mar 3, 2012

I need to migrate a 500 GB 10.2 database from windows to linux. Of course I found Alejandro Vargas paper on how to do that ("Database Migration From Windows to Linux Using RMAN"). My problem is that the source database will be up again for 7 days and I need to apply all changes made to the source database to the migrated linux database.

Can I just take all redo log files generated from the source database and apply those to the destination database? I might have a problem with a) file conversion and that the redo log are not in sync with the target database (different check points?).I just found that on an exotic website: "The contents of a redo log file depend on a combination of Oracle version, operating system and server architecture. In general redo logs written on one architecture cannot be read on another. There are a few exceptions to this rule. For example, in Oracle 10.2 a redo log written in Linux can be read by a Windows database."

So if this is true, does it also work the other way AND will the database migration from window to linux create a perfect clone of the database where those redo log files actually can be applied to?

View 1 Replies View Related

Apply 11.2.0.2 Database Server Patch In EBS 12i Env?

Jul 20, 2012

We need to apply the the 11.2.0.2 database server patch and this is a 12i Ebusiness suite env. Do we need to take any precautions(other than stopping the apps) on the APPS side when we are applying the patch on the database?

View 2 Replies View Related

Replication :: Apply Process Is Not Working?

Oct 5, 2011

I have created Replication process for a single table using the below mentioned script.

connect sys/afccv@afccv as sysdba
show parameter open_cursor
create user STRMADMIN identified by STRMADMIN;
ALTER USER STRMADMIN DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP QUOTA UNLIMITED ON USERS;
GRANT CONNECT, RESOURCE, AQ_ADMINISTRATOR_ROLE,DBA to STRMADMIN;
execute DBMS_STREAMS_AUTH.GRANT_ADMIN_PRIVILEGE('STRMADMIN');
connect sys/vxmldb@vxmldb as sysdba

[code]....

According to Alert log file Replication process started( Refer Alert log content below

Wed Oct 05 12:45:53 2011
Streams CAPTURE CP01 for STRMADMIN_CAPTURE started with pid=256, OS id=8692
Starting persistent Logminer Session with sid = 41 for Streams Capture STRMADMIN_CAPTURE
Wed Oct 05 12:46:20 2011
LOGMINER: Parameters summary for session# = 41

[code]....

Now When I am checking the apply status then it is showing Dequeue message

SQL> l
1* select apply_name,state,DEQUEUE_TIME from V$STREAMS_APPLY_READER
SQL> /
APPLY_NAME STATE DEQUEUE_TIME
------------------------------ ----------------- --------------------
STRMADMIN_APPLY DEQUEUE MESSAGES

when I am checking the number of rows on both tables (source and destination) , at destination it is not applying any thing.

View 5 Replies View Related

Forms :: How To Apply Group By Command In 6i

May 22, 2012

How To Apply Group by Command in Forms 6i at block level for example in data block a field name is code,quantity and code replicate many times it is not working with out commit but i want to calculate sum of quantity in data block by code group before commit

if we apply this command at sql level then command is

select code,sum(nvl(quantity,0)) from sal_detail group by code and its work very well

View 11 Replies View Related

Clusterware :: How Much Space Should Apply For ASM Instance

Aug 6, 2012

I will begin to install Oracle Clusterware (11gR2), but I need to know how much space should I apply for the ASM instance? What size should I apply the shared disk to the nodes?

View 5 Replies View Related

PL/SQL :: Apply LPAD In NUMBER Datatype?

Jun 27, 2013

Can we apply LPAD in NUMBER datatype?

View 11 Replies View Related

ORA-26713 Streams Apply Error And Gateway

Mar 27, 2013

My setup is following:

CODEhost22 (Oracle Linux 5.9)               |  host30 (Windows XP) with SQL Server Express 2008
         DB22       | Gateway to MSSQL  |                 DB30
Local       Local   |                   |                    
Capture --> Apply ------> Gateway -----------------> DUMMYUSR.DUMMYTBL      
Process     Process |                   |

Capture process on DB22 captures changes made to local DUMMYUSR.DUMMYTBL table, enqueues it to capture queue and propagates to apply queue for local apply process, which, using database link DB30 supposed to apply these changes to table DUMMYUSR.DUMMYTBL on remote SQL Server database DB30.

The problem is that when apply process is executing transaction, it aborts with error:
QUOTE ORA-26713: remote object does not exists or is inaccessible.
ORA-26712: remote object is "DUMMYUSR"."DUMMYTBL"@"DB30".
In trace log I can see the following message:
QUOTE kniNoPrimaryKeyError: ORA-26713, remote obj doesn't exist,
DUMMYUSR.DUMMYTBL@DB30
[code]...

what can cause ORA-26713 error of apply process applying changes to SQL Server database through Oracle Database Gateway, if object to be modifyed exists and accessible from Oracle database for strmadmin user?

By the way, database link and tables were created with following commands: CODEDB22(Oracle): (connected as strmadmin) create database link DB30 connect to "dummyusr" identified by "dummypwd" using 'DB30';

DB22(Oracle): (connected as dummyusr)
create table DUMMYTBL (no number, name char(6), ddate date, payload varchar2(2013));
DB30(MSSQL): (connected as dummyusr)
create schema DUMMYUSR authorization dummyusr;
create table DUMMYUSR.DUMMYTBL (no float(53), name char(6), ddate datetime2(0), payload varchar(2013));

View 1 Replies View Related

Data Guard :: How To Apply Archives In Standby

Sep 1, 2010

i have attended an interview there i got a question like--->There are 100 archives generated in standby in that a series of five archives are missing and those are not available in the primary then how will you do.....

View 2 Replies View Related

Server Administration :: How To Apply Composite Key On A Table

Jul 21, 2011

How can i apply composite key on a table?

View 2 Replies View Related

Server Administration :: Apply Oracle Patch 10.2.0.5?

Nov 22, 2010

I want to upgrade 10.2.0.1 to 10.2.0.5.

Can I straightly apply 10.2.0.5 or need to sequentially apply one by one?

View 2 Replies View Related

Server Administration :: Apply 11.1.0.7 Patch Set On 10.2.0.3 Database?

Mar 25, 2010

can we apply 11.1.0.7 Patch Set on a 10.2.0.3 database server? i mean are patch sets cumulative or do i have to install the patch specific to my release the issue is i have the below error with rman: RMAN-03009: failure of delete command on ORA_DISK_1 channel at ORA-19633: control file record is out of sync with recovery catalog

View 7 Replies View Related

Performance Tuning :: On Which Columns To Apply Index

Mar 5, 2012

I have two tables like below-

CREATE TABLE prod_vendor_record (
vendor_record_seq_no NUMBER NOT NULL,
study_seq_no NUMBER NOT NULL,
vendor_subject_seq_no NUMBER NULL,
control_dataset_seq_no NUMBER NOT NULL,
checksum NUMBER NOT NULL,
processing_flag VARCHAR2(1) NULL,

[code]....

and executing below query on those tables-

insert into prod_temp_vendor(vendor_record_seq_no,checksum,rownumber,transaction_type,iu_flag)
select vr.vendor_record_seq_no, tvr.checksum, tvr.rownumber, tvr.transaction_type, 'U' from
prod_vendor_record vr, prod_temp_vendor_record_20000 tvr
where vr.study_seq_no=25707
and vr.control_dataset_seq_no=3910
and vr.key_hash=tvr.key_hash
and dbms_lob.compare(vr.key_col_val, tvr.key_col_val) = 0
and tvr.error_flag is null;

let me know on which columns of PROD_VENDOR_RECORD table to apply index to make processing faster. As I tried to build index like below-

CREATE INDEX idx_prod_vendor_record
ON prod_vendor_record (
study_seq_no,
control_dataset_seq_no,
key_hash
)
/

But it is not being used by above query (see execution plan)

--------------------------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib |
--------------------------------------------------------------------------------------------------------------------------------------
| 0 | INSERT STATEMENT | | | | 5168 (100)| | | | |
| 1 | PX COORDINATOR | | | | | | | | |
| 2 | PX SEND QC (RANDOM) | :TQ10002 | 212 | 445K| 5168 (1)| 00:01:03 | Q1,02 | P->S | QC (RAND) |

[code]....

View 15 Replies View Related

Real Time Apply For Logical Standby

Nov 15, 2012

Oracle 11.2.0.3.0

I have a primary database orcl and logical standby database orcl_std.

Real time apply is enabled. I have standby redologs in both primary and standby sides and I`ve started recovery with below command:

ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;

When I create a new table in primary database, I am unable to see it on standby database (Although real time apply is enabled) However, when I switch log in primary, I can see the new table in standby database.

My question is, why realtime apply is not working in my scenerio ? I was expecting to see the new table immediately in standby database once it is created in primary database. Why am I supposed to wait for log switch in real time apply ?

View 5 Replies View Related

Streams :: Unable To Drop Apply Queue?

Oct 10, 2013

,I am trying to set up Streams on a 11.2.0.3 on a Windows 2008R2 server.  Due to an error in running propagation, i a, trying to delete both Capture and Apply queues. I have deleted the Apply queues but unable to drop the Catpure,

SQL>EXEC DBMS_APPLY_ADM.STOP_APPLY(apply_name =>'LAO_NLPG73_BLPU_APPLY');  SQL> select * from dba_apply; LAO_NLPG73_BLPU_APPLY NLPG73_BLPU_APPLY_Q STRMADMIN YES RULESET$_732 STRMADMIN STRMADMIN 301355 ABORTED 09/10/2013 17:34:21 1013 ORA-01013: user requested cancel of current operation CAPTURED STREAMS APPLY  SQL> select * from dba_queues; STRMADMIN NLPG73_BLPU_APPLY_Q

[code]...

View 5 Replies View Related

Apply Referential Integrity To Only Selected Rows Of Particular Column?

Mar 23, 2011

Can I apply Referential Integrity to only selected rows of a particular column? This is the reference key to the primary key to another table. But, the issue is, this reference column is not having mandatory data for all the rows. So, whenever this is null, I dont want it to be referred by parent table.

no, and it makes no sense to do so either

We have an appointment form in our HIS, where patients take telephonic appointment. That time they may not know their user id given by hospital. So, it remains blank & name is entered manually. But if the user-id is entered, it must fetch patient name from the master.

The candidate key must be unique within its domain.The candidate key can not hold NULL values.

ALTER TABLE HLTHCHKAPPOINTHD ADD (
CONSTRAINT SYS_C007145
FOREIGN KEY (N_PATIENTMR_ID)
REFERENCES MRREGISTRTNHD (N_PATIENTMR_ID));

MRREGISTRTNHD is a patient master & has a primary key named N_PATIENTMR_ID.
HLTHCHKAPPOINTHD is a appointment table & has a foreign key named N_PATIENTMR_ID which references N_PATIENTMR_ID of MRREGISTRTNHD.

Also, N_PATIENTMR_ID of HLTHCHKAPPOINTHD is not a unique key & it can contain null values also. I want to define constraint or any other method such that only the not null values are referenced to the master i.e. it should validate in the master. And null values should skip this reference.

Now, what happens is due to this constraint, when I'm trying to edit & update the rows having null value in N_PATIENTMR_ID, it gives the following error.

ORA-02291: Integrity constraint (SYS_C007145) violated - parent key not found

So, can I give some condition in the above constraint saying, apply this constraint to table HLTHCHKAPPOINTHD only having the not-null values in N_PATIENTMR_ID coulmn?

View 2 Replies View Related

DataGuard - Archive Log Apply Gap In Physical Standby Database

Nov 23, 2010

1) The Primary Database is UP. The Physical Stand By Database is DOWN. The Current Archive Log Sequence is 99 in Primary.

We have to apply Archive Log from 51 to 99 to the Standby Database. But Unfortunately, there is no backup of those Archivelogs and the ArchiveLogs from 51 to 98 have got deleted at Primary end.

Now how will you apply these Archive Logs from Primary Database to Physical Standby Database?

Note : The Physical StandBy Database is DOWN.

View 2 Replies View Related







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