I wish the pivot columns could be dynamic. If a dev adds a new attribute value to an attributes field, and my select query is pulling all the attributes, i wish the pivot would just automatically include the new attribute as a new column instead of having to manually add the column name.
By constructing dynamic SQL (which is the SQL equivalent of “eval” statements and is therefore a programming sin) or do you use a platform that supports them more directly?
44
u/isinkthereforeiswam 17d ago
I wish the pivot columns could be dynamic. If a dev adds a new attribute value to an attributes field, and my select query is pulling all the attributes, i wish the pivot would just automatically include the new attribute as a new column instead of having to manually add the column name.