0

Can someone see my error? I'm trying add these calculated fields into a Text(20) column of a Data Extension.

ROUND(CAST(C.USD_SALE_PRICE AS INT)/CAST(C.USD_RETAIL_PRICE AS INT)*100,0) AS PRICE_DIFFERENCE_PERCENTILE

ROUND(CAST(C.USD_RETAIL_PRICE AS INT)-CAST(C.USD_SALE_PRICE AS INT),0) AS PRICE_DIFFERENCE_ABSOLUTE
2

1 Answer 1

0

Turns out it was a Data Type conversion error. :-(

ROUND(CAST(C.USD_SALE_PRICE AS DECIMAL)/CAST(C.USD_RETAIL_PRICE AS DECIMAL)*100,0) AS PRICE_DIFFERENCE_PERCENTILE

ROUND(CAST(C.USD_RETAIL_PRICE AS DECIMAL)-CAST(C.USD_SALE_PRICE AS DECIMAL),0) AS PRICE_DIFFERENCE_ABSOLUTE
1
  • 1
    Please turn this into a proper answer where you show how you now do the field conversion, thanks.
    – Dave Humm
    Commented Oct 5, 2016 at 5:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .