Reputation: 9
I want to execute the following SQL statement on BigQuery:
create table TMSPCBTDZOP000(
ART_ID VARCHAR(18),
LND_ID VARCHAR(3),
ART__BEZ VARCHAR(60),
ART_ANZ_ID VARCHAR(18))
I got the following error message:
Error: Syntax error: Expected ")" or "," but got "(" at [2:24]
I tried both legacy and standard SQL.
We are currently trying to use BigQuery as a data source for our reporting software (MicroStrategy) and it fails with the error shown above. The same error appears if I directly fire this SQL statement in bq. How can I fix this?
Upvotes: 0
Views: 11296
Reputation: 1
I think you are looking something like mentioned in old thread here Create table SQL syntax in Google Bigquery I found it useful and this may help you how to create a table in bigquery.
Cheers,
Upvotes: 0
Reputation: 33705
VARCHAR
is not a supported data type; see the data types documentation. Use STRING
instead:
create table TMSPCBTDZOP000 (
ART_ID STRING,
LND_ID STRING,
ART__BEZ STRING,
ART_ANZ_ID STRING
)
You need to use standard SQL for this, and you probably need to qualify TMSPCBTDZOP000
with the name of the dataset, e.g. dataset.TMSPCBTDZOP000
.
Upvotes: 2