Can I ask how to write the correct query for UNION in Big Query.
For example, Table A = has some columns which the data type is not string.
Table B = No such columns in the picture above.
Can someone help to write the correct query
Can I ask how to write the correct query for UNION in Big Query.
For example, Table A = has some columns which the data type is not string.
Table B = No such columns in the picture above.
Can someone help to write the correct query
Try explicitly specifying null
values:
with table_a as (
select 'from table a' as src, current_datetime() as datetime_column, 1.5 as float_column, 3 as integer_column
),
table_b as (
select 'from table b' as src
)
select * from table_a
union all
select src, null, null, null from table_b