I have a table of 250k worth of data and out of this data I have 1000 rows that have the same data in every column bar one reference column which is different. What I would like to do is split the reference column if certain conditions are met, and if these conditions are not met, the reference value can
Tag: unpivot
Create group column with values based on join [closed]
I have two tables 1) a customer table 2)Account table. I want to see what accounts are primary and which are secondary accounts. In one table I have accountRowId and AccountNumber. In the other …
Convert columns to rows in Firebird (unpivot command)
Which is the similar command for unpivot in Firebird? TKS in advance… My Table Desired Result Answer You can use union all: Something like this should work for most purposes. EDIT: For your particular data:
Unpivot with column name
I have a table StudentMarks with columns Name, Maths, Science, English. Data is like I want to get it arranged like the following: With unpivot I am able to get Name, Marks properly, but not able to get the column name in the source table to the Subject column in the desired result set. How can I achieve this? I