SQL & PL/SQL :: Alternative Of Soundex Function

Feb 16, 2010

Is there any alternative of Soundex function. I have two table of city. I want to compare city of both table. Now problem is that one city name is 'HANGO'. In table A City is feed with spelling 'HANGO' and other it is spelled 'HANGU' OR 'HUNGU'. Similarly there are many cases. I used Soundex function but it is not working perfectly.

Is there any other way to compare data by sound.

View 1 Replies


ADVERTISEMENT

Performance Tuning :: Getting Alternative To REPLACE Function?

Jun 12, 2010

I have a table with:

1 million rows
average row length 200 bytes
50 columns
and this update statement
UPDATE mytable SET varchar2_4000_column = replace(replace(replace...300 times)

It looks at every row in the table (no WHERE clause) and does these 300 replace operations on this column for each row. Each replace replaces with a null so effectively it is removing strings. Much of the time these strings are not in the column.

This update statement takes 25 minutes and it is 98% CPU and 2% USER_IO time.

I figure that is what is taking all the time since it is a CPU bound statement. if rows in this table are persistent over time then tag rows with a flag to show which ones have already been processed and skip these next time around.

View 2 Replies View Related

PL/SQL :: Function Retrieve Output Very Slowly - Alternative Code To Replace With Join?

Aug 6, 2012

In my project, the below function retrieve output very slowly. Is there any alternative code to replace this function with join

CREATE OR REPLACE FUNCTION f_johnson (i_case_id number,i_seq_num argus_app.case_reference.seq_num%type) RETURN VARCHAR2 AS
c_ref VARCHAR2(32500) := null ;
CURSOR c_refer IS

[code]...

View 2 Replies View Related

PL/SQL :: Update Words Based On Soundex

Nov 19, 2012

I have the following table and data , So i want to update this table(word column) with words that has same soundex with one word of them, the word must be that has the long length if the two words has same length So, update by any of them.

drop table t1;
create table t1 (id number(10) ,word varchar2(100));

insert into t1 values(1,'Londn');
insert into t1 values(2,'Egypt');
insert into t1 values(3,'London');
insert into t1 values(4,'Gorgey');
insert into t1 values(5,'Michal');
insert into t1 values(6,'Michel');
insert into t1 values(7,'London');
insert into t1 values(8,'Egpt');
insert into t1 values(9,'Londan');
insert into t1 values(10,'Gorgy');
insert into t1 values(11,'Gorge');the results must be as following
id    word
1     London
2     Egypt
3     London
4     Gorey
5     Michal
6     Michal
7     London
8     Egypt
9     London
10   Gorey
11   GoreyNote: this is the results of soundex

SQL> select soundex(word) from t1;

SOUN
----
L535
E213
L535
G620
M240
M240
L535
E213
L535
G620
G620

11 rows selected.

View 10 Replies View Related

SQL & PL/SQL :: Alternative For Not In

Nov 8, 2011

I've got to create 2 tables...

Table 1 include members of a certain club with specific criteria
Table 2 needs to include everyone else on the main database, not in the club, but with the same criteria.

So, ultimate goal is to have two tables, similar criteria, T1 = club members and T2 = non-club members

Table 1 ran just fine.

Table 2 is running and running and running. I'm looking for a more efficient way then the syntax below:

create table NON_club_Members nologging as
select distinct hcp.ID, count (distinct hcp.profile_key)
from mrtcustomer.table_1 hcp, Club_Members cm
where hcp.child_birth_dt between '31-OCT-2000' and '30-OCT-2011'
and hcp.ID not in
(select cm.id from Club_Members)
group by hcp.id

I've also tried <> and that also ran and ran and ran.

View 1 Replies View Related

Alternative To DECODE In Regards To Just SQL (not PL)

Jul 1, 2007

im used to using PL SQL via oracle. but lately ive been doing a lot of mysql and PHP and i really need to use something similar to DECODE in my queries. or am i forced to do the checks via PHP.

View 6 Replies View Related

SQL & PL/SQL :: Alternative To UTL FILE?

Jan 12, 2011

I have been told that I cannot use Oracle directory objects, external tables and the UTL_FILE package in my production environment for security reasons.

In this scenario what are the alternate options available in Oracle to write a file and save it in a specific location in the server. One of my requirement is to process a file and write the results of processing in a output file in the application server which in turn will be accessed by the online application.

View 7 Replies View Related

Alternative To DESC

Dec 12, 2006

For whatever reason, in PHP, DESC statements do not work. They're simply unrecognized and you get an OCI "invalid SQL statement" error. It may be some sort of security feature. I've also had the same result with the SQL scratchpad in the Java EM, but not in SQL Plus. Is there an alternative method for getting details on a table that I can use that also doesn't require being logged in as a SYSDBA?

View 5 Replies View Related

Alternative To Union Of Two Different Table?

Dec 21, 2010

Is there any alternative to Union or Union all of two different table. Example would be great.

View 5 Replies View Related

SQL & PL/SQL :: Alternative To Oracle Cursors

Aug 13, 2013

an alternative to Oracle Cursors.My table has huge amount of data and is taking time in processing. I had thought of using BULK COLLECT but it can only be used to insert, delete or update data and will not allow me to select data.

View 33 Replies View Related

Tnsnames.ora With 2 Alternative IP Server

Jan 31, 2012

Is there a way to put on tnsnames.ora the alternative IP of a server that if the first dont respond it tries the ip of the second? Example:

ORA92 =
(DESCRIPTION =
(ADDRESS_LIST =
try
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.1)(PORT = 1521))
except
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.0.2)(PORT = 1521))
end )
(CONNECT_DATA =
(SERVICE_NAME = tsh1.world)
)
)

View 6 Replies View Related

Client Tools :: SQL Monitor Alternative?

Jan 5, 2011

Many moons ago, at a previous employer, I had access to the SQL Monitor tool that came with TOAD. I could really use an alternative to this now, as we don't have TOAD here, and it would need to be free. I'm getting a problem with a forms update failing, and I really need to see what's actually being submitted to the database by the form. We're still stuck on Forms 6 by the way

View 2 Replies View Related

SQL & PL/SQL :: Alternative For Writing Subquery In IF Condition

Sep 4, 2011

I am working in EBS 11i and database 9i. I know that we can not write subquery in IF condition like below.

IF deptno IN (select deptno from dept)
--
END IF;

Is there any alternative to achieve above scenario.

View 1 Replies View Related

PL/SQL :: Getting Alternative To LEFT OUTER JOIN?

Sep 21, 2012

I have the following query but it is taking too much time because of the LEFT OUTER JOIN on HST table which is a huge table , is there an alternative to LEFT OUTER JOIN that can be used to optimize the code:

SELECT HST.COMP_CODE,
HST.BRANCH_CODE,
HST.CURRENCY_CODE,
HST.GL_CODE,
HST.CIF_SUB_NO,
HST.SL_NO,
SUM(CV_AMOUNT) CV_AMOUNT,

[code].....

View 10 Replies View Related

How To Load Alternative Records Into Table By Using Sql*loader

Sep 26, 2013

1)my csv file contain 100 records,i want to load 60 records into one table and reaming into another table with same control file by using sql*loader ?

2)how to load the alternative records into table by using sql*loader

View 1 Replies View Related

Reports & Discoverer :: Alternative For Live Previewer?

Aug 25, 2012

My clients want to print the output of reports of size 25*12 and 15*12 in 11g and I am able to do the printing but the page break required for each page is not coming properly and because of this they cannoy identify which is the 1st and 2nd paper..

But in 6i D2K, there is the Live Previewer through which I can print without any page break issues.

My query is what is the alternative for Live previewer in Oracle Reports 11g so that i can make it right.

View 1 Replies View Related

SQL & PL/SQL :: Alternative To Nested Group By For Performance Enhancement?

Dec 1, 2011

I need consultation on an alternative to a query that I wrote and seems very expensive.

I have the following table:

CREATE TABLE TRY_B
(TID NUMBER PRIMARY KEY,
INFO1 VARCHAR2(10),
INFO2 VARCHAR2(10),
GROUP_NO NUMBER,
TYPEID NUMBER);

[code]....

My objective is to get the data of group_no that is repeated more than once and which includes exactly one occurrence of typeid = 0.

My current query is:

SELECT * FROM TRY_B
WHERE GROUP_NO IN
(
SELECT GROUP_NO
FROM TRY_B
GROUP BY GROUP_NO

[code]....

which works but takes very long time with the real data as my real table is huge.

View 6 Replies View Related

SQL & PL/SQL :: Alternative To Filer Initial Using Single REGEXP_REPLACE?

Feb 9, 2011

Any alternative to filer the Initial using a single REGEXP_REPLACE ?
Oracle version 10.2.xxxx

Currently using two REGEXP_REPLACEs.
SELECT REGEXP_REPLACE(
REGEXP_REPLACE('K I Rajuvan K I', '(([[:upper:]]{1,2})) ','')
, '([[:upper:]]{1,2})$','') CITY
FROM dual;

View 8 Replies View Related

Application Express :: How To Know Which Default Alternative Report Selected

Oct 15, 2012

I'm using apex 4.1 and create a page with Interactive report with one default primary report and several default alternative report. when i selected one alternative report, how do i know which one is i picked up? it looks obvious to the user but my point is when the user switches to another page, or there are something should change based on the selected report, i want the user see the new page with-in the context of what have selected for that IR report. for example, i have a "summary" report based on year, so the alternative report will be year-2011, year-2012, etc, when user selected this year, 2012, on the same IR page, there is another report based on year 2012, when user selected 2011, that report should show 2011 report.

View 0 Replies View Related

Replication :: Alternative For Complete Refresh / Delete Records From MVIEWS?

Aug 19, 2009

TABLE NAME :ABC
(PARTITION BASE TABLE - 84 Partition and each Partition has 500-800 Millions of Records)

/* Step1 Create MATERIALIZED VIEW LOG */
CREATE MATERIALIZED VIEW LOG ON ABC;

/* Step2 Create MATERIALIZED VIEW Refresh after Every 20 Minutes */
CREATE MATERIALIZED VIEW MV_ABC
REFRESH FAST
START WITH SYSDATE
NEXT SYSDATE+20/ (24*60) AS
SELECT * FROM ABC
WHERE TMSTP > SYSDATE-1;

Scenario:Intially data extracted will be "Greater than SYSDATE-1 = 18/08/2009 11:27:39 " - 76 Millions of Records After 20 Min of FAST Refresh, it will add 2500 Records

i)Is query in the MVIEWS (MV_ABC) SYSDATE-1 will be changed on each FAST Refresh, as observation (as per definition) it is incrementing the records to intial extracted data?

ii)As COMPLETE Refresh will be expensive to execute on the partition base table on each refresh.
Is there any alternative way to achieve the Nature of COMPLETE REFRESH in Materialized View?

iii)Is Delete or Conditional Delete option is possible in Materialized View (i.e not a delete from the base table but the delete from MVIEWS)?

iv)What is the machnism for populating the logs for MVIEWS?Is it overhead for the system and better than a Trigger based approach?

View 11 Replies View Related

PL/SQL :: To Create Function Based Index For Group Function Columns

Jun 15, 2012

Is anyway to create function based index for group function columns.

For example

select max(timestamp),min(age),averge(sal).... ... .. from tab;

View 5 Replies View Related

PL/SQL :: Calling External C Function / ORA-06521 Error Mapping Function

Feb 4, 2013

I have the following C code:

class Factorial {
  public:
  int getVal (int a);
};
[code]....

/When I am trying to execute this function always get the ORA-06521. I changed the data types - but nothing changed.

Just in case, listener.ora
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = db)(PORT = 1521))
                   (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
[code]....

View 6 Replies View Related

SQL & PL/SQL :: Difference Between Stand Alone Function And Function Declared In A Package?

Mar 11, 2010

What is the Difference between a Stand Alone Function/Procedure & a Function/Procedure declared in a Package.

View 2 Replies View Related

SQL & PL/SQL :: What Is Advantage Of Deterministic Function Over Normal Function

Jun 10, 2010

What is advantage of Deterministic function over normal function?

What is the diff B/W Deterministic function and normal function and also give me a example in which scenario we use Deterministic function?

View 4 Replies View Related

Use MAX Function Without It Being In Results?

Apr 4, 2007

i have a query where i am using the max function to find the most recent record. What i want to do is use that query as part of an insert statement into a different table, however, i don't want to insert the column that i used the max function on. Is there anyway to use the max function without having the column it is being used on showing in the results?

View 1 Replies View Related

How To Use The NVL() Function In Statement

Mar 24, 2009

I have the following query.

sql

Original

- sql Code

SELECT class, COUNT (class)
FROM nv_table
WHERE l_id IN (
SELECT l_id
FROM n_table
WHERE id IN (1234)
GROUP BY class
ORDER BY class

SELECT class, COUNT (class) 
FROM nv_table 
WHERE l_id IN (          SELECT l_id            FROM n_table           WHERE id IN (1234)   
GROUP BY class   
ORDER BY class

It returns two columns: class and the total number of values in that class.

In some cases, there might not be any values under a certain class, so the query won't return anything.

In such a case I want the query to return 0. So what I want to see is:

class:A, COUNT(class):0

I'm trying to use the NVL function here, but either it doesn't work in this context, or it's not the correct syntax the way I'm writing it.

sql

Original

- sql Code

SELECT class, NVL(COUNT (class), 0)
FROM nv_table
WHERE l_id IN (
SELECT l_id
FROM n_table
WHERE id IN (1234)

[Code]....

View 3 Replies View Related

SQL & PL/SQL :: DML Operations Within Function

Dec 16, 2011

I am creating an stored function which has to do some inserts in the meanwhile, and return after all the work has done, an UDT (2 or 3 columns of NUMBER datatype).

With this scenario I have an problem. The DML operations are not supported by and "SELECT * FROM Table(MyProc(args))". I have to use this "SELECT * FROM Table(MyProc(args))" because I need to pass the stored function results directly to an dataset.

Using a Stored Procedure it gives no errors, but the arguments must be passed like OUT params, and it is not what I want.

My question is:
Is there any other way to get a result (UDT) of an Stored Function (that makes Inserts) into a DataSet?

View 12 Replies View Related

SQL & PL/SQL :: Regexp_replace Function

Jul 14, 2010

I've been tasked to parse tags from a string that look like the following:

{Date + XXX}

where XXX represents a numeric value. I have to replace this, including the brace characters with

SYSDATE + XXX

which will ultimately calculate SYSDATE plus the number of days suggested by XXX. The problem is that I am trying to use regexp_replace to achieve this goal but since XXX is completely arbitrary, I cannot search for it as a fixed value. So, ultimately, I would like to use a regular expression that ignores the numeric part of my search and only replaces the starting brace, the "Date + " part and the ending brace, leaving the numeric portion intact. I was trying to do something like the following

myString := regexp_replace(myString, '{(Date + [^[::digit:]]{1,})}', to_char(SYSDATE, 'FMMONTH DD, YYYY'));

in hopes of making it ignore the numeric part but it, instead, treats occurrences as a non match. Alternatively, the call below

myString := regexp_replace(myString, '{(Date + [[:digit:]{1,})}', to_char(SYSDATE, 'FMMONTH DD, YYYY'));

matches correctly but replaces the numeric portion as well, so I'm left with just today's date instead of the calculated future date...

View 14 Replies View Related

SQL & PL/SQL :: LAST-VALUE Analytical Function?

Sep 11, 2012

I'm posting below test case in which I'm not able to understand output for LAST_VALUE function. I'm expecting maximum value for the salary in a department. Because I'm partitioning by department and ordering a partition as assending so being last value it should give me maximum value within a partition i.e. department in this case.

CREATE TABLE EMP_MST
(
EMP_ID NUMBER(5),
EMP_NAME VARCHAR2(30),
CONSTRAINT PK_EMP_MST PRIMARY KEY(EMP_ID)

[code]...

View 4 Replies View Related

SQL & PL/SQL :: Have More Than One Blocks In Function

Jun 14, 2011

can i have more than one pl sql blocks in a function and can i use the variable of one cursor into another cursor of the same function?

View 2 Replies View Related







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