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 |
|
Rita Bhatnagar
Posting Yak Master
172 Posts |
Posted - 2002-04-25 : 16:28:24
|
| The last Statement after And is not right.Any Suggestions?Thanks.SELECT DISTINCT B.ChargeLinkNumberFROM (BillingSetup AS A INNER JOIN BillingSource AS B ON A.BillingSetupID = B.BillingSetupID) LEFT JOIN Reversals AS C ON A.ReversalID = C.ReversalIDWHERE A.CompanyEntityID = @prmCompanyEntityID AND (A.LastBillingTrackingID = 0 And A.ReversalID =0) OR ( A.ReversalID > 0 ) And (C.ReversalBillingTrackingID = 0 <> A.LastBillingTrackingID = 0))GROUP BY B.ChargeLinkNumber |
|
|
Peter Dutch
Posting Yak Master
127 Posts |
Posted - 2002-04-26 : 02:16:15
|
| Really depends on what you want.Check the () in your WHERE statement. I can't give you the solution because I don't know how you want to evaluate the AND's and OR's. |
 |
|
|
|
|
|