I am combining 6 different fields into 1 large lookup field. 4 of them are varchar, 1 is a double and 1 is a decimal(10,2). I am having an issue with the decimal field. Sometimes the second digit of the decimal does not appear. Here is the code for the lookup field:
LookupField = a.Supplier + a.OrderNumber + a.OrderType + CAST(a.Line AS VARCHAR) + ReceiptDoc + CAST(a.AmountReceived AS VARCHAR)
Prior to this, I cast the decimal field as a float. The reason for that is because some of the values are even, for example, 100 and that is how the end user wants it displayed. As a decimal field, it displays as 100.00. I notice that when I do not cast it as a float, the lookup field displays correctly, but the amount received field still has the .00 displayed.
AmountReceived = CAST(j.[Amount Rcvd] AS float)
How can I resolve the issue with the decimals? I have tried using STR and CONVERT, but ultimately the same issue occurs.