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 |
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2006-12-13 : 02:08:36
|
| hi fys,master tablelnno code value 1 30 general 1 42 csd 2 142 chennai 2 143 maduraigworker tableidno name unitcode citycode4012 sen 30 1424013 uma 42 1434014 xx 142 142my code is:select code,value from master where code in(select distinct(unitcode), from gworkerselect distinct(citycode) from gworker )just i need code,value from master without using join |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-13 : 03:09:34
|
| select code, value from master where code in (select unitcode from gworker union all select citycode from gworker)Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|