Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

GROUPING IN SQL DEVELOPER(Fuzzy grouping in SQL)

994691Jul 18 2013 — edited Jul 18 2013

Hi All,

I am stuck up with some logic here, can any one suggest me what would be the best solution or how can we acheive this.

We have a customer id's , each customer can have many accounts, and the customer belongs to a company.I need to modify a SQL table to group slightly mismatched names, and assign all elements in the group a standardized name.

I have a customer table where I used select customer_id,customer_code,customer_name from customer order by 1; These are only few records I am showing here.

CUSTOMER_IDCUSTOMER_CODECUSTOMER_NAME
071239AABATrac Non Owned Chassis
078176AABATrac Charleston
071910AABATrac Savannah
081010ABAAHanjin Shipping
081102ABAAAtg

In this case, I've chosen the first name to assign as the "standardized name," but I don't actually care which one is chosen .If I knew that the names were all in pairs, this would be a relatively easy query, but there can be an arbitrary number of the same name.


And I am using SQL DEVELOPER, for Oracle data integrator(ODI)


Thanks,

Ven

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2013
Added on Jul 18 2013
3 comments
520 views