View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 07:12 PM
Anith Sen
 
Posts: n/a
Default Re: SQL query problem

Always post table DDLs, sample data & expected results for such
requirements. Here is my guess:

SELECT b.btdnumber AS btdnumber,
b.btdtrfno AS bbtdtrfno,
a.btdtrfno AS btdtrfnohidden,
a.BtdAcno AS BtdAcno,
a.BtdCertNo AS BtdCertNo,
a.BtdShare AS BtdShare,
c.shmName
FROM shrbatchdetail a
RIGHT OUTER JOIN shrbatchdetail b
ON a.btdrecid = b.btdrecid
AND a.btdsellbuy = 'S'
INNER JOIN shrShareMaster c
ON c.shmacno = b.btdacno ;

--
--- Anith


Reply With Quote