I’m running a report on our database using Crystal Reports. Sadly some chimp on the vendor side has got the data type wrong on a field and I can’t do the join I need. Obviously I’m not in a position to change that data type myself.

So, after some searching I have this:
CAST(awarded_by AS INTEGER) AS awarded_id FROM BVPI_EVALS

I’ve never used CAST before but here I’ve used it to convert a STRING to an INTEGER. I’ve used this in the Add Command section of the Database Expert screen.

I’ve then removed BVPI_EVALS from the query and used the table created by the Command to do the joins.

It’s super slow, though. I think I might need to parameterize the query too.