'Format character prefix onto data in Bigquery
I have a query where I am trying to add a prefix to week numbers.
Right now, the query puts out the week numbers as (1,2,3,4...) Is there a way where I can add "Wk" to the beginning of the week number for the entire row? (ex: Wk 1)
'''FORMAT_TIMESTAMP('%m-%d-%Y', CAST( ttl.insert_timestamp AS DATE)) AS Cycle_Time,
EXTRACT(ISOWEEK FROM ttl.insert_timestamp) AS Week,
FROM tableName ttl'''
Solution 1:[1]
You might be looking for
CONCAT("Wk ", CAST(EXTRACT(ISOWEEK FROM ttl.insert_timestamp) AS STRING)) AS Week
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 | Cylldby |
