Skip to content
Advertisement

selecting columns which are NOT of a specific type SQL

I want to select all the columns in BigQuery that are not of the type “TIMESTAMP”. I have written the query which returns such columns which is:

But I am struggling to return data from only these columns in SQL, I have tried the following query which results in “Scalar subquery produced more than one element”.

Can anyone please help me out here in getting the columns from table ‘t1’ where the datatype!=TIMESTAMP? Thanking you in anticipation!

Advertisement

Answer

Applying @Mikhail’s advise in the comment’s section, you can try this query:

Table: enter image description here

Output: enter image description here enter image description here

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement