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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-06-20 : 09:40:51
|
| Neera writes "Hi,I have 2 tables.create table Table1( TId int)create table Table2( Name varchar(300), TString varchar(3000))Table1 has:TId300234456789999938Table2 has:Name TStringA, 300,234,9,8B, 456,234,3,8C 300,789,999D 999,234,9,8The result I shoud get as:TId Name300 A,C234 A,B,D456 B789 C999 C,D9 A,D3 B8 A,B,DCan anyone help me please..Thanks,Neera" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-06-20 : 09:55:45
|
| TrySelect T1.id, T2.name from table1 T1 inner join table2 T2on ','+T2.name+',' like '%,'+cast(t1.id as varchar(10))+',%'You need to read about Normalisationhttp://www.datamodel.org/NormalizationRules.htmlMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|