i currently have a procedure that phonetically compares strings.
we have a contacts database and some of our sales staff are morons and don't bother looking to see if a company already exists before trying to add the company to the system.
i'm using Oracle 8.0.5
to get around this when someone enters a company name in the creation box (web forms) i split the string up, remove padding words 'the', 'and', 'ltd', 'limited', etc., and soundex each part before comparing.
i also create an acronym after the noise is removed to compare.
if a new company is created i store an soundex string as a variable in the table, as one string of concatenated soundex strings.
at the moment to compare these strings i store each individual soundex i create in a a table called 'temp_storage_table', run a select query with a join on this table, then delete from the 'temp_storage_table'
this gives me a count of all possible matches on the individual words in the company name, the higher the count the closer it matches.
i would like to remove the need for temp_storage_table, and run it as dynamic SQL or similar if possible.
is there any way that in dynamic sql you can have a table that exists only for the lifetime of the sql ... or produce a select that will return as many rows as i want from dual?
can i have a query that does something like:
that you're aware of?
Thanks
we have a contacts database and some of our sales staff are morons and don't bother looking to see if a company already exists before trying to add the company to the system.
i'm using Oracle 8.0.5
to get around this when someone enters a company name in the creation box (web forms) i split the string up, remove padding words 'the', 'and', 'ltd', 'limited', etc., and soundex each part before comparing.
i also create an acronym after the noise is removed to compare.
if a new company is created i store an soundex string as a variable in the table, as one string of concatenated soundex strings.
at the moment to compare these strings i store each individual soundex i create in a a table called 'temp_storage_table', run a select query with a join on this table, then delete from the 'temp_storage_table'
this gives me a count of all possible matches on the individual words in the company name, the higher the count the closer it matches.
i would like to remove the need for temp_storage_table, and run it as dynamic SQL or similar if possible.
is there any way that in dynamic sql you can have a table that exists only for the lifetime of the sql ... or produce a select that will return as many rows as i want from dual?
can i have a query that does something like:
Code:
select count(pieces.piece_id)
from companies, (select piece_id from ('S234','N120','P235'))
where companies.phonetic like '%' || piece_id || '%';
that you're aware of?
Thanks