Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Syntax error Query

Hi All,

I am writing this string but I have always a syntax error.

 

INSERT INTO 'project-49087.customer_data.customer_address'

project id is  project-49087

database is customer_data

table is customer_address

 

Any advice?

Thanks

0 1 456
1 REPLY 1

The syntax error in your INSERT statement for Google Cloud BigQuery is likely due to the use of single quotes around the table name. In BigQuery, table names should be referenced using backticks (`) instead of single quotes. Here's how you can correct the syntax:
 
INSERT INTO `project-49087.customer_data.customer_address` ...

Replace the ... with the rest of your INSERT statement, such as the columns you are inserting into and the values for those columns. For example:

 

INSERT INTO `project-49087.customer_data.customer_address` (column1, column2, ...) VALUES (value1, value2, ...);

Make sure to replace column1, column2, etc., with the actual column names of your table, and value1, value2, etc., with the corresponding values you want to insert.