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 - 2001-12-06 : 10:08:44
|
| kalpak writes "i have two table one is table1 which containsitemid,desc,vnname,qtysecond table table2 containsitemid,qty now i want fetch all columns from table1 and qty from table2 but the condition is :i want that rows which have the same itemid in both tables and that rows which itemid doen't exist in table2.Thankskalpak" |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2001-12-06 : 10:16:53
|
| select t1.itemid,t1.desc,t1.desc,t1.vnname,t2.qty from table1 t1left join table2 t2 on t1.itemid=t2.itemidthis should do it, i would suggest u to read about joins.-------------------------Nazim -- "Success is when Preparedness meets Opportunity" |
 |
|
|
|
|
|