I’m currently writing an SQL statement which outputs the details of a delivery for a customer, into a nice repeater grid. However, based on a field in the customers table (with an integer determing how many rows), i need to be able to generate that many rows with the exact same details in them.
I.E: A delivery has one row, but based on the number in the customers table for that customer, the same row needs to be outputted that many times in the SQL.
Any ideas? Sorry if it’s a bit confusing, and I know it sounds stupid, but from the SQL ‘labels’ are being generated for that delivery, and multiple labels may be required.
Extended answer from AdaTheDev. Using a CTE to create the number table.