What do the SQL code look like for a simple pivoting example with a few table in sixth normal form?
Alot of people talk about how its easy and fast to pivot using 6NF tables but its really hard to find a example of this.
Lets say i have the following tables:
Table: EntryCost
EntryId
Cost
Table: EntryMonth
EntryId
Month
Table: EntryDim1
EntryId
Dim1
Table: EntryDim2
EntryId
Dim2
How would i pivot this without using MSSQL PIVOT or equivalent? Saying i wanted to aggregate Cost with dimensions down the side and months along the columns
I think general approach would be something like this: