DECLARE @proximity int SET @proximity = 2 -- change this value to suit your situation SELECT Loose.Charges.PK AS Charge#, Loose.Charges.Amount AS Charge, Loose.Payments.PK AS Payment#, Loose.Payments.Amount AS Payment FROM Loose.Charges INNER JOIN Loose.Payments ON ABS(Loose.Charges.Amount - Loose.Payments.Amount)<= @proximity GO |
Charge">#f3f3f3"> Charge# Charge Payment# Payment 1 100.00 1 99.00 2 12.005 12.00 6 998.00 6 1000.00 |
Charge">#f3f3f3"> Charge#ChargePayment#Payment 1100.00199.00 212.00512.00 356.00NULLNULL 443.00NULLNULL 559.00NULLNULL 6998.0061000.00 |
Charge">#f3f3f3"> Charge#ChargePayment#Payment 1100.00199.00 212.00512.00 356.00NULLNULL 443.00NULLNULL 559.00NULLNULL 6998.0061000.00 6998.0071000.00 |
欢迎光临 DIY编程器网 (http://diybcq.com/) | Powered by Discuz! X3.2 |