I would like to create multiple Columns at runtime based on values in rows of a single column. The values in this columns won't be fixed either.
I have tried using the CASE expression in SQL without any success.
select ProductID , PartNo, Description, Qty,
(case when Supplier = Supplier then Supplier end) as Suppliers
from tblSuppliers
The supplier column will have multiple suppliers.
I am unable to create tables in this forum so its quite difficult for me to show the results like others who are smarter.
But basically i will have multiple rows with lets say the same product having different suppliers.
How to show those Rows of the same product in one row with multiple Columns created at runtime with the heading of the Columns being Names of the Supplier.
I hope i have explained well.