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 |
svibuk
Yak Posting Veteran
62 Posts |
Posted - 2011-06-17 : 08:27:12
|
1)select i.acno,i.pa_no,datepart(year,i.sdate) as YR , heads, i.address_1,i.address_2,i.address_3,i.city, ISNULL(NULLIF(i.pin,''),0) as IPIN , i.email, i.tel_off,t.contact1 , t.designation, t.address_1, t.address_2 , t.address_3,t.city,ISNULL(NULLIF(t.pin,''),0) as TPIN,ISNULL(NULLIF(t.email1,''),'-') as email1from table1 i,table2 t , table3 z2)select sum(basic+surcharge+eduess) from table3 z3)select count(distinct vno) as count from table3 zi have the above query 1in that i need qry 2 & 3 , |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-07-08 : 05:07:02
|
You can use that as a subquery in query1select ...., (select sum(basic+surcharge+eduess) from table3 ) as sum, (select count(distinct vno) as count from table3) as count from ....MadhivananFailing to plan is Planning to fail |
|
|
|
|
|
|
|