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 |
sureshprpt
Starting Member
33 Posts |
Posted - 2010-11-20 : 06:51:52
|
Hi , I have the two table , one for qty and another one for unit wt.If the UOM for item is no , it have the unit in KG.But the issue if i download the report to merge the two table, the Number uom are download correctly in the total wt. But for KG UOM total wt was not captured. Examples data are follows.Table 1Itemno - UOM- QTYAAA- EA- 12BBB- KG - 1000CCC-EA - 10Table 2 Item NO - UNit wtAAA - 2 CCC -3I want output isAAA- EA- 12 - 24BBB- KG-1000-1000CCC- EA- 10 - 30Kindly help me to write queries for the above ouput Thanks & RegardsSuresh |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-11-20 : 10:14:14
|
[code]SELECT a.ItemNo, a.UOM, a.qty, a.qty * ISNULL(b.UnitWt, 1)FROM Table1 aLEFT OUTER JOIN Table2 bOn a.ItemNo = b.ItemNo[/code] |
|
|
|
|
|