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.
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.
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
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
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.
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.
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.
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?
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.
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
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:
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.
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;
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.
/* 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?
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?
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?
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
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.