I'm trying to run the following query but keep getting the same error
Syntax error: Expected end of input but got identifier "BD_Dictionary" at [3:1]
My query is:
SELECT
MI.* except(period_date, entity_level, email_access, period_filter)
BD_Dictionary.BD_EMAIL, BD_Dictionary.AREA_LEAD, BD_Dictionary.BD_LEADER
FROM
`mi-trial-365509.Trial.MI` as MI
INNER JOIN
`mi-trial-365509.Trial.BD Dictionary` as BD_Dictionary
ON
A.bd_email = BD_Dictionary.BD_EMAIL
LIMIT
1000
CodePudding user response:
Sorry my bad, i forgot to put a comma in between the table source in SELECT command.
my code is now like this:
SELECT
MI.* except(period_date, entity_level, email_access, period_filter),
BD_Dictionary.BD_EMAIL, BD_Dictionary.AREA_LEAD, BD_Dictionary.BD_LEADER
FROM
`mi-trial-365509.Trial.MI` as MI
INNER JOIN
`mi-trial-365509.Trial.BD Dictionary` as BD_Dictionary
ON
MI.bd_email = BD_Dictionary.BD_EMAIL
LIMIT
1000
CodePudding user response:
Could someone help me to work on with the null result in BD_Dictionary.BD_EMAIL, BD_Dictionary.AREA_LEAD, BD_Dictionary.BD_LEADER
is that possible to make it like IF statement in excel or spreadsheet like IF BLANK/NULL THEN take/keep data from the first table which is MI.bd_email, MI.bd_sublead_email, MI.bd_lead_email
??