sql - Data type changing after multiplying two columns in MS Access -
i want multiply 2 columns each other , use following code
cdbl(amount) * cdbl(weighting) [amount_weighted],
"amount" regular number while "weighting" value between 0 , 1. resulting column formatted "short text" in access, although should number. column "weighting" or "amount" can empty, may reason malfunctioning? wrong formatting gives causes "number stores text" error when want export resulting column excel.
the fact single lines empty caused problem.
nz(amount,0) * nz(weighting,0) [amount_weighted]
using instead of cdbl , therefore inserting "0" empty lines solved problem.
Comments
Post a Comment