Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

SQL INNER JOIN syntax Error BigQuery // New to SQL

I’m getting this error "No matching signature for operator = for argument types: INT64, STRING. Supported signature: ANY = ANY at [9:6]
"
while trying to JOIN two table in BQ, Login ID column is listed in the two tables but BQ shows that there’s an error on line 9enter image description here

SELECT
  performance.name,
  performance.ahtdn,
  tnps.tnps,
FROM
  `data-exploration-2023.jan_scorecard_2023.performance-jan-2023` AS performance
  LEFT JOIN 
    `data-exploration-2023.jan_scorecard_2023.tnps-jan-2023` AS tnps
  ON performance.login_id = tnps.login_id

I’ve checked the syntax for INNER JOIN online and on BQ documentation but I couldn’t find the reason why I get this error.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

The error should be due to trying to join INT64 and STRING column. It should be resolved casting the numeric column to text one like this:

CAST(performance.login_id AS STRING) = tnps.login_id

or cast the second one if it is the numeric.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading