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
 Eliminating redundant rows by inser mul val in col

Author  Topic 

cse514
Starting Member

6 Posts

Posted - 2011-08-10 : 14:51:52
sir i am writing this requesting you a solution for the following problem which i was strucked in..
Assume the sample flatrelation containing three columns COURSE LADY GENTLEMAN. now we have to eliminate redundancy.for example consider the first and third rows.we can notice that course and gentleman fields are same but the two records are varying only in lady field.we can combine this sort of records into a single one by making lady nested so that it can handle multiple values thereby eliminating redundancy.processing should be done on this table and this sort of records should be merged into single record by making lady nested and the left over distinct records should be inserted as well in the table.
eg:
COURSE LADY GENTLEMAN
swing dulcinea quixote
swing theresa quixote
swing dulcinea sancho
swing theresa sancho
street eve tupac

into the following format.. i.e nested over lady
COURSE LADY GENTLEMAN
swing {dulcinea,theresa} quixote
swing {dulcinea,theresa} sancho
street {eve} tupac



robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-08-11 : 10:07:26
Dupe: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=164110
Go to Top of Page
   

- Advertisement -