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.
| Author |
Topic |
|
shantanu4u
Starting Member
1 Post |
Posted - 2008-10-31 : 11:02:55
|
| Hello All Please help me with the below issuesCUST (Customer Table) cust_id cust_typ desc KUM-67890 PRI primary customer MAHA-540 SEC secondary customer ABHI-420 SEC secondary customer BHAW-999 SEC secondary customer Link table between the customer from above table know as CUST_REFCust_Id_1 Cust_Id_2 Desc MAHA-540 KUM-67890 .... ABHI-420 KUM-67890 .... BHAW-999 KUM-67890 .....Now we have to insert a link customer so that customers can be grouped togetherExampleCUST (Customer Table)cust_id cust_typ descKUM-67890 PRI primary customerFRIE-67890 FRI friend(link Customer)DUSH-67890 DUS others(link Customer)MAHA-540 SEC secondary customerABHI-420 SEC secondary customerBHAW-999 SEC secondary customerAnd now the link in the table CUST_REF should be link thisCust_Id_1 Cust_Id_2 DescFRIE-67890 KUM-67890MAHA-540 FRIE-67890FRIE-67890 KUM-67890ABHI-420 DUSH-67890BHAW-999 FRIE-67890i have sending the descriptive diagramexample main cust(KUM-67890) !---secondary customer( MAHA-540) friend !---secondary customer(ABHI-420)dusman !---secondary customer(BHAW-999)dusmanNow i have to group the similar item into one jaise main cust(KUM-67890) !---link customer(FRIE-67890) !---secondary customer(MAHA-540) friend !---secondary customer(BHAW-999)friend !---link customer(DUSH-67890) !---secondary customer(ABHI-420)others Could you pleae help me to write the above code in Trnsact SQL i am new to it. RegardsKumar [/size=1][/size=1] |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-31 : 11:07:20
|
| what designates who should be linked to DUSH and who to FRIE? |
 |
|
|
|
|
|