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
 SQL Quries from 3 tables

Author  Topic 

jdeforums
Starting Member

8 Posts

Posted - 2010-03-18 : 03:00:23
Dear all,

I want to take single report combination of 3 tables.
Kindly send the quries to download report .The Table structure & Fileds are follows.

TABLE 1
Order No Itemcode
Table 2
Order No Qty
Table 3
Itemcode Unit WT

The output was
Order No - ITEMCODE - QTY - TOTAL WT(TABLE2 QTY * TABLE 3 UNITWT).
KIndly help me to write quries.

Thanks in advance





Suresh.K.P

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2010-03-18 : 03:05:29
Home Work???

Select t1.Order_No, t1.Itemcode,t2.Qty,(t2.Qty*t3.UnitWT) as TOTAL_WT from
table1 t1 inner join Table2 t2 on t1.order_no =t2.order_no
inner join table3 t3 on t1.Itemcode=t3.Itemcode

Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled

http://senthilnagore.blogspot.com/
Go to Top of Page

jdeforums
Starting Member

8 Posts

Posted - 2010-03-19 : 05:46:21
quote:
Originally posted by jdeforums

Dear all,

I want to take single report combination of 3 tables.
Kindly send the quries to download report .The Table structure & Fileds are follows.

TABLE 1
Order No Itemcode
Table 2
Order No Qty
Table 3
Itemcode Unit WT

The output was
Order No - ITEMCODE - QTY - TOTAL WT(TABLE2 QTY * TABLE 3 UNITWT).
KIndly help me to write quries.

Thanks in advance

Thank sir, i download the data successfully.



Suresh.K.P



Suresh.K.P
Go to Top of Page
   

- Advertisement -