Skip to content

Tag: google-bigquery

Big Query Error When Using CAST and determining decimals

I have linked a Big Query Project to my Google Ads Account. Within that, we have a campaignBasicStats table. I want to pull the cost of a campaign from my Google Ads account into a big query workspace to apply some additional logic. The cost column is coming through as an INTEGER and is described like this: I…

How do I extract the string after 0: in big query sql

I want to extract extract “f9sdsdsd-1375-41f7-8c4c-ereb20ad3843c” from “0:f9696a03-1375-41f7-8c4c-34b20ad3843c”. I am currently using TRIM(REGEXP_EXTRACT(“0:f9696a03-1375-41f7-8c4c-34b20ad3843c”, r”0:[^:]+)”)) . However, I am not getting being able to extract it…

CURRENT in BigQuery?

I’ve noticed that CURRENT is a reserved keyword for BigQuery at: https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. What exactly does CURRENT do? I’ve only seen it as a prefix for things such as CURRENT_TIME(), CURRENT_DATE(), and other such stuff but have never seen it by itse…