Top "Unpivot" questions

UNPIVOT describes a Query Language feature of some Relational Databases.

How can I get around differences in column types when using unpivot?

I am having problems using unpivot on columns, that are not the exact same datatype, and I can't figure out …

sql sql-server tsql pivot unpivot
How to unpivot in BigQuery?

Not sure what functions to call, but transpose is the closest thing I can think of. I have a table …

sql google-bigquery transpose unpivot
Syntax errors with UNPIVOT and JOIN in FROM clause

I'm using SQL Server Express (with advanced services), version 10.50.1600.1. I need to use a UNPIVOT to create multiple rows from …

sql-server join syntax unpivot
Merge multiple columns values in one column in one row Oracle SQL

I have got multiple columns that needs to be aggregated into column in a single row. Before Table name: columnMerger …

sql oracle pivot unpivot listagg
Build SQL query with dynamic columns

My tables go as follows: Patients table PatientId Name 1 James ... Visits table Date PatientID_FK Weight 1/1 1 220 2/1 1 210 ... How can I build …

sql sql-server pivot unpivot