All Forums General
Johnmghenry 11 posts Joined 04/15
17 Jun 2015
Underlying table contains all bad fields 'The format or data contains a bad character'

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 (
SELECT
sales.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)

 

Glass 225 posts Joined 04/10
17 Jun 2015

John,
 
Please provide the DDL for sales and product.
 
Rglass

You must sign in to leave a comment.