Hi,
is there a way to do unpivot in single?
and not to use union
Hi lior!
Are you meaning you are trying to unpivot a single table?
I’m thinking unpivot only applies to multiple tables.
Can you provide more detail about your goal so we can further assist?
Hi Maria,
I want to unpivot table from a wide table (VendorID, Emp1, Emp2,
Emp3, Emp4, Emp5 ) to long table (VendorID, Emp, value)
see example from microsoft documentation:
thanks!
Thanks for sharing this Lior.ha! We will look into it. Let me get back to you shortly. Appreciate your patience. Thanks
Hi @lior.ha ,
We don’t support UNPIVOT. We do have a feature request open for that, and I will make a note of your use case.
Eric
We’re still considering doing this but it’s not on our near-term roadmap. What specifically do you want to do with it?
Any further consideration here? This is an extremely common use case when you deal with non-native data that an application allows to be uploaded, think time-series data from a source CSV that is directly uploaded with dates on columns. A simple UNPIVOT DML or equivalent to a CROSS JOIN LATERAL (ala PG) would be really helpful.
@rafa I’ve noted your request for this. I don’t have a firm timeline for direct support of this feature. For the time being, you best bet would be to program the logical UNPIVOT with a stored procedure or external application.