Kristen Jones
asked on
MS SQL Query De-Mystified
Can some one translate this query so it can be understood as to what it is doing? Feel free to explain it as if you were talking to a Monkey or 3 year old
SELECT P.County_ID, P.Parcel_ID, P.Rate_ID, P.Add_ID, P.Exempt, IIf(P.UnitAssessment=-1,P. UnitAssess mentValue, IIf(P.Buil dHT>=4,(P. CTaxLand*( P.Benef*0. 01))+((P.C TaxBuild/P .BuildHT)* 3*(P.Benef *0.01))+(( P.CTaxBuil d/P.BuildH T)*(P.Buil dHT-3)*0.0 6),IIf(P.P artial_Pro t=-1,IIf(P .Bldg_Incl =-1,(P.CTa xLand*(P.W et_Perc*0. 01)*0.03)+ (P.CTaxBui ld*0.03),P .CTaxLand* (P.Wet_Per c*0.01)*0. 03),(P.CTa xLand+P.CT axBuild)*( P.Benef*0. 01)))) AS dblBenefit, BR.Bond_rate, TR.Tax_Rate, P.id, P.UnitAssessment, P.UnitAssessmentValue, TR.TaxRate_Description, P.MainCounty
FROM BondRate AS BR, MATCHEDTAXPARCELS AS P INNER JOIN TaxRate AS TR ON P.Rate_ID=TR.CharCode;
SELECT P.County_ID, P.Parcel_ID, P.Rate_ID, P.Add_ID, P.Exempt, IIf(P.UnitAssessment=-1,P.
FROM BondRate AS BR, MATCHEDTAXPARCELS AS P INNER JOIN TaxRate AS TR ON P.Rate_ID=TR.CharCode;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window