I have an unusual sitution. The below query works when I don't refer to any of the fields in the 'product_table'.

If I leave the product table join in it still works so it's not an issue with the join.

However, when I bring any of the fields into the select statement from the product join it gives me an error statement 'The format or data contains a bad character'.

Code:

​CREATE TABLE sandbox.jh_sales as (SELECTsales.sales_person,sales.sales_region,sales.sales_id,product_name --this is where I get the error. If I leave this out the query works. However, when I leave it in I get The format or data contains a bad character FROM sales_table sales LEFT JOIN product_table product ON product.sales_id=sales.id)with data primary index (sales_id)