'BigQuery Search which results in Error: Scalar subquery produced more than one element
Running this query on BigQuery but resulting in this error: Error: Scalar subquery produced more than one element
select *
from CRM.organizations
where name LIKE (select org_name from CRM.deals where UUID is not null and status = 'won')
Is it possible to look for similar strings when the similarity is to a list of entries?
Solution 1:[1]
Use below - IN
instead of LIKE
select * from CRM.organizations where name IN (
select org_name from CRM.deals
where UUID is not null and status = 'won')
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mikhail Berlyant |