sql - Nesting a Select Distinct and returning all results from Joined tables -
i have 2 tables both have memberid
in common. want return distinct accounts have balance greater 0.00 , billing notify = 2 results after date. have come far is:
use plantation select tblmember_v62.acct, tblmember_v62.first, tblmember_v62.last, tblmemberaccount_v62.balance tblmember_v62, tblmemberaccount_v62 dbo.tblmember_v62.memberid = tblmemberaccount_v62.memberid , tblmemberaccount_v62.balance > '0.00' , tblmember_v62.billingnotify = '2' , (tblmemberaccount_v62.insertdate > '2012-01-01 00:00:00.000' or tblmemberaccount_v62.updatedate > '2012-01-01 00:00:00.000') order dbo.tblmemberaccount_v62.memberid, tblmember_v62.last
how can return distinct results? know shouldn't hard.....
use plantation select distinct tblmember_v62.acct, tblmember_v62.first, tblmember_v62.last, tblmemberaccount_v62.balance tblmember_v62, tblmemberaccount_v62 dbo.tblmember_v62.memberid = tblmemberaccount_v62.memberid , tblmemberaccount_v62.balance > '0.00' , tblmember_v62.billingnotify = '2' , (tblmemberaccount_v62.insertdate > '2012-01-01 00:00:00.000' or tblmemberaccount_v62.updatedate > '2012-01-01 00:00:00.000') order dbo.tblmemberaccount_v62.memberid, tblmember_v62.last
Comments
Post a Comment