Build BOM in Query - Issues with Rounding Qty/Parent

I found this amazing BAQ searching for BOM info on the forum. I’m having an issue with it rounding the qty/parent field unfortunately. Even though these decimal fields are being cast again as decimal in the CTE, they are being rounded to the nearest whole number. I’ve tried using both cast and convert and increasing decimal places in the format.

Any ideas how I can stop the rounding from happening?

cast(xxxx as decimal(6,2)) did the trick!

1 Like