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.

 All Forums
 Development Tools
 Reporting Services Development
 Query for KG UOM

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 1
Itemno - UOM- QTY
AAA- EA- 12
BBB- KG - 1000
CCC-EA - 10

Table 2
Item NO - UNit wt
AAA - 2
CCC -3

I want output is

AAA- EA- 12 - 24
BBB- KG-1000-1000
CCC- EA- 10 - 30

Kindly help me to write queries for the above ouput




Thanks & Regards
Suresh

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 a
LEFT OUTER JOIN
Table2 b
On a.ItemNo = b.ItemNo
[/code]
Go to Top of Page
   

- Advertisement -