PL/SQL :: Replicate For Loop Functionality Through SQL Query

Jun 14, 2013

I have a requirement where i need to replicate the for loop functionality  through sql query.In pl/sql  i can achieve this through cursors or for loop but is there any way  to do  or replicate the same functionality in sql queries .  For example i want to repeat the  operation for  set of records  or iterate through set of records and fire query accordingly .Is it possible  through sql query

View 19 Replies


ADVERTISEMENT

SQL & PL/SQL :: Query Inside For Loop

Nov 3, 2011

i am trying to do something the following .. but I can't get the syntax correctly for the select statement inside the secondary_loop ...

EmailBodyHTML := '';
main_loop := '';
secondary_loop := '';

[Code]....

View 4 Replies View Related

SQL & PL/SQL :: Designing A Query - Who To Loop Through Process

Jul 22, 2011

i have query which scores a customer details on some factors and gives it a rank/I have a table called agents which holds the agents details.

This is how i get the rank:
select *
from (
select customer_name ,agent_number

[code]....

The agents table has agent_number and agent_Name....By the above query i check various score against all available agents and assign customers to agents who have highest score or rank is 1

But my problem is who to loop through the process.. i mean after the intial customers are assinged with agents it should run again for remaining customers and for agents who are free(and rank for them is 1) should be checked for assignment Once all agents are assigned but still more customers are available then agents even thoug they are already assigned they can be assigned now since no agent is free..

View 14 Replies View Related

Performance Tuning :: Query With Nested Loop Takes 6 Hours To Complete

Jun 23, 2011

I'm joinging two tables event_types and tmp_acc tables.

event_types contains 2 Billion records
tmp_acc contains 20,000 records.

Resulting rows are about 300,000 records in event_types table end_t and account_obj_id0 are joined indexed

no indexs in tmp_acc.

When I run below query with nexted loop it takes 6 hrs to complete. But when I run with hash join even after 4 days it was still running. what is wrong with hash join here. Why it takes so long. I'm joining only 20000 rows. So I think there should be a way to get result rows quickly.

show parameters hash_area_size

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hash_area_size integer 2097152

explain plan for
select --+ parallel(e,6)
[code]....

View 21 Replies View Related

Replicate Oracle XE Database In 10G?

Mar 23, 2007

I want to replicate my Oracle XE database in Oracle 10G. Is their a 'simple' way to do that? I know that XE does not have server backup.

View 2 Replies View Related

Replication :: Add Exttrail To A Replicate?

Aug 27, 2012

How can i add exttrail to a replicate?

View 1 Replies View Related

Replication :: Replicate To 2 Database Using Snapshots Log?

Dec 4, 2007

I have a table MYTABLE in database mydb1 duplicated via materialized view and materialized view log and refresh_snapshot commands to a MYTABLE on mydb2 database.

I like to duplicate this table MYTABLE to a third database mydb2, using the same method (materialized view and refresh_snapshot command).

Is it possible ? What's hapend to the materialized view log where I launch a refresh_snapshots on mydb2 ? How is this materialized view log truncated ?

View 5 Replies View Related

Replication :: How To Replicate One Schema To Other System

Aug 3, 2012

I need the steps to replicate one schema to other system. I am using standard edition one 11gR2. Necessary steps to implement (basic replication).

View 2 Replies View Related

Replicate User In Oracle Database

Jan 31, 2013

I Have one oracle user ABC which is having 10 Tables.

Now i want to create replica of this user XyZ which can access only 5 tables from . This user having All access.

Example :

Any DML changes made in XYZ these changes should be reflected in ABC user. and vice a versa.

How can i achive this in ORACLE DB.

View 10 Replies View Related

Client Tools :: How To Replicate A Package In One Database To Other

Sep 4, 2013

I have a package called getEmpData in database orcl. I want to move/creat the same package on other database called ora. I want to do/simplyfy this work through PLSQL DEVELOPER.

View 3 Replies View Related

Replication :: Replicate (A) Schema Objects To (B) At Server?

Mar 30, 2011

I told about Oracle multi master replication below.

Can I replicate some objects of "X" schema at A server to "Y" schema at B server using MM replication?

View 13 Replies View Related

TimesTen In-Memory :: Using Propagators To Replicate To Many Subscribers

Oct 9, 2012

The document says "Propagators are also useful for distributing replication loads in configurations that involve a master database that must replicate to a large number of subscribers".

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

My question is how do we define this " large number ". Is 5 a large number or 10 a large number ? I've a bidirectional legacy replication scheme wherein a node replicates to 10 other nodes. Should i introduce Propagator between these nodes.

View 3 Replies View Related

PL/SQL :: OUT Parameter Functionality

Mar 25, 2013

I thought that you are not supposed to be able to assign the value of an out parameter to a variable (Feuerstein, 5th ed) and yet I was just
able to do this without any compilation error messages. Is Feuerstein wrong or am I missing something? Has the functionality changed?

PROCEDURE Parse_HC
          (p_timestamp_string IN VARCHAR2,
          p_timestamp_date OUT DATE)
AS
v_date DATE;

[Code]....

Here is my banner:

BANNER
----------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 – Production
"CORE     11.1.0.7.0     Production"
TNS for Linux: Version 11.1.0.7.0 – Production
NLSRTL Version 11.1.0.7.0 - Production

View 8 Replies View Related

Replication :: Replicate One Table In Two Materialized Views At Same Time

Nov 11, 2008

I have a table in one database and I want to replicate it in another two databases with materialized views. The refresh may be fast. Is this possible?

View 1 Replies View Related

RAC & Failsafe :: Replicate From Physical To VM / Storage DELL Compelled

Jul 13, 2012

We have the following scenario that we need to replicate:

Our current systems are on oracle RAC+ASM with 2 nodes, they are on physical hardware.We would like to replicate from physical to VM, storage is DELL compellent.

Can this be done online without RMAN at SAN level replication? how to replicate the systems.

View 1 Replies View Related

PL/SQL :: High Consistent Reads / Cannot Replicate In Test Environment

Feb 8, 2013

I am having performance issues on a query in a production environment that I cannot replicate in our test environment. Our test environment is an import of production. Version information is:

Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
PL/SQL Release 10.2.0.3.0 - Production
CORE     10.2.0.3.0     Production
TNS for Solaris: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - ProductionWhen I run the query in test, I get the following results using TKPROF
[code]....

Misses in library cache during parse: 1
Optimizer mode: ALL_ROWSThis performance problem started a few weeks ago and the problem seems to be in the high number of consistent reads during fetch. The DBA tried restarting the instance and gathering fresh stats on the tables but that has not made a difference. Now he wants to export the tables, drop the schema and re-import.

View 8 Replies View Related

Stream Functionality Replacement In 11g

Dec 15, 2010

Earlier I am using oracle 10g (10.2.0.4) and now we are planning to use 11gR2 (11.2.0.1).we are using oracle stream functionality in 10g. I just want to know is there any new feautre available in 11g which replace the stream functionality? we dont want to use stream (in 11g) any more.

View 3 Replies View Related

SQL & PL/SQL :: Decode Functionality With Null

Jun 29, 2010

Explain me the following behavior of DECODE?

SQL> select decode(null,null,'Matched','Not Matched') from dual;

DECODE(
-------
Matched
As expected, output should be 'Not Matched' instead of 'Matched'

View 10 Replies View Related

Forms :: GET_FILE_NAME Functionality

Mar 8, 2010

I have my forms application working on both windows and Unix platform. When i am using GET_FILE_NAME ( ), it is working fine in Windows based application but the same is not working in Unix based application..

View 11 Replies View Related

SQL & PL/SQL :: Decode Functionality In DBMS_OUTPUT

Jun 28, 2010

I would like to use the below decode in DBMS_OUTPUT in place of cur_rec.data_type. Could I know how can I achieve this.
The DBMS_OUTPUT is inside a loop and output is shown below as an example.

NOT NULL -- EMP_ID NUMBER
,NOT NULL -- EMP_NAME NUMBER
,NOT NULL -- HIRE_DT DATE
,NOT NULL -- SALARY NUMBER

DBMS_OUTPUT STMT:

Dbms_Output.Put_Line(nullable ||CHR(9)||CHR(9)||' -- ' ||upper(cur_rec.column_name)||CHR(9)||CHR(9)||cur_rec.data_type);

STMT to use in place of cur_rec.data_type:

substr(decode( data_type, 'NUMBER', decode( data_precision, NULL, NULL,'('||data_precision||','||data_scale||')' ),data_length),1,11)

Also I am not able to align the output using CHR(9).

View 14 Replies View Related

Forms :: JTF Grid Functionality

Sep 12, 2009

what is JTF GRID functionality,i have use that grid in custom form. how to proceed with that and what are steps to be taken to display JTF GRID Functionality ?

View 6 Replies View Related

SQL & PL/SQL :: Procedure Functionality As Triggers

Oct 26, 2010

I am creating triggers for audit operation when any insert/update/delete happens on a table automatically.Now i need the same functionality in procedure.

My requirement is to create procedure for all those triggers.

View 2 Replies View Related

Replication :: Golden Gate - Replicate Data From Oracle To Sybase

Oct 17, 2007

Implemented the Golden Gate replication tool? In particular, to replicate data from Oracle to Sybase?

No details are needed, just a quick nod indicating "yes, it has been done successfully".

View 1 Replies View Related

DATE-ADD In Oracle - Convert Functionality?

Oct 28, 2011

I need to convert below functionality in Oracle. At present it is working with SQL server

current_end_time TIMESTAMP,
current_start_time TIMESTAMP
current_duration int
current_end_time := DATEADD(second, current_duration/10, current_start_time)

View 1 Replies View Related

PL/SQL :: Possible To Use Forall Instead Of For Loop - End Loop

Nov 19, 2012

CREATE OR REPLACE PROCEDURE IND_MONITOR(P_tab VARCHAR2)
is
type ind_table is table of varchar2(20);
p_ind ind_table;
v_sql varchar2(2000);
begin
select index_name bulk collect into P_Ind from user_indexes where table_name=upper(P_tab);
for i in 1..p_ind.count loop
v_sql :='alter index '||p_ind(i)|| ' monitoring usage'
execute immediate v_sql using p_ind(i);
end loop;
end;

can i use forall instead of 'for loop ..end loop'

View 10 Replies View Related

Replication :: Oracle XE - Replicate DDL Statement Without Loosing Data In Subscribe Table

Apr 22, 2008

i work in an application that should make the replication from a publusher table to a remote subscribe table, using snapshot,and trigger, replication data of update works perfectly (update,insert,delete), but when i try to add or dropp a clumn in the publisher table, repplication fail, i know that my method d'ont replicate ddl statment like create or alter table, so i would like the better way to do the replication of the ddl statment without loosing tha data in the subscribe table, i'm working with oracle XE,

View 1 Replies View Related

Forms :: Restrict Standard Save Functionality?

Jun 20, 2011

how can we restrict standard save button functionality in custom form?

View 4 Replies View Related

Forms :: Auto Stretch Functionality In Oracle?

Oct 6, 2013

Is it possible to have auto stretch functionality (similar to Oracle ADF) in Oracle Forms?

The requirement is to adjust the data blocks/ canvases according to the window size automatically.

I know it is possible in Oracle ADF. But I want to achieve the similar kind of functionality in Oracle Forms.

View 1 Replies View Related

Client Tools :: Access Violation And F4 Functionality

Jan 14, 2012

I am using the Toad10.After i enter the user, Pwd it displays the Toad error that""Access violation at address 6761CB21 in module 'ORA805.dll'. Read of address 00000010 ""

while i try to use the F4 functionality, it again displays the above msg and Object not found...After i execute the query, all the characters data displays in chinees.

View 1 Replies View Related

SQL & PL/SQL :: Create A Trigger With Requirement Of Achieving Primary Key Functionality?

Sep 22, 2011

I want to create a trigger with the requirement of achieving Primary key functionality.

I have a "EMP" table. the table already contains a duplicate data on "EMPNO" column. i want to restrict entering duplicate data further into table for that i want to create a trigger.

where can i find different triggering events of DML(like update, delete etc...)and DDL(database and schema level).

View 6 Replies View Related







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