Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help! A cluster method in SQL

Author  Topic 

mavershang
Posting Yak Master

111 Posts

Posted - 2008-11-26 : 13:45:22
Hi guys, I have a question of cluster method in SQL.

A table contain 3 columns: rownumber, name, value.
I want to cluster the rows according to their values.

Step 1: First I create another table (tracking table), randomly put some
rows from the data table into this tracking table as the seeds.

Step 2: Then I want to calculate the (ith_value_from_datatable - jth_value_
from_trackingtable)**2, and assign ith row of data table into the jth group
according the the smallest distance calculated above.

Step 3: Then update the tracking table by calculating the new average of jth
group value.
Go back to step 2 until ............

So the question is about how to do that cycle in two tables.

I am really new to SQL and not familiar with SQL code. Could anyone help me
out of this question?

Thanks a lot.

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-26 : 19:46:38
Dups :
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=115241
Go to Top of Page
   

- Advertisement -