Distribute arbitrary rows on multiple columns
问题 I have a table of materials. I need to fill a data entry form from that table. The problem is that the data entry form is divided into multiple columns each one containing a a number of materials as in the picture. How to write a tsql select query to obtain the first bunch of material names into a column, the second bunch into a second column and so on. 回答1: It might be easiest to do this in the client side, and not in the database, but if you really want to do this, I would assume the