David Rehak
David Rehak

Reputation: 11

Receiving cryptic message from BigQuery,Error: Encountered "" at line 0, column 0

I am receiving the message "Error: Encountered "" at line 0, column 0." from google BigQuery from the following abbreviated query;

select b.description, c.description, c.product_key, c.brand, c.u_size, 
c.flavor,
sum(case when a.period_key=201611 then dollars else 0 end),
sum(case when a.period_key=201610 then dollars else 0 end),
sum(case when a.period_key=201511 then dollars else 0 end)
 from [SN_DM.facts_q] as a join [SN_DM.nb_markets] as b on (a.market_key=b.market_key) join [SN_DM.nb_products]
as c (a.product_key=c.product_key)
where
a.market_key in (55,61,62,63,64,65,66,67,68)
and ( c.category_tag in ('BCHAIR','BCSOAP','BCDEOD') or 
c.subcategory_tag in ('BCSKBL','BCSKFC','BCSKFL','BCSKSC','BCSKST'))
and a.period_key between 201412 and 201611
group by b.description, c.description, c.product_key , c.brand, c.u_size, c.flavor ;

I don't see any issues with the SQL and the google message is not useful, Any help would be greatly appreciated.

Upvotes: 0

Views: 2561

Answers (1)

J Zhang
J Zhang

Reputation: 21

I encountered a similar issue. There is something going on with the second join clause. join [SN_DM.nb_products] as c (a.product_key=c.product_key)

The "on" term is missing after "c".

Hope it helps.

Upvotes: 2

Related Questions