Avatar of GreatSolutions
GreatSolutions
Flag for Israel

asked on 

Multiply result rows in a query

Hi
How can i multiply the number of resulting rows in a query based on the value of a field.

For instance:
select customers.CustomerID, customers.CustomerName, customers.Address from Customers order by CustomerName
 
will give me a list of customers. Now, assuming i have a customers.Quantity field, i would like that each resulting row in the query will appear Quantity times, i.e if quantity=2, that customer's row will appear twice

Thanks
Jaime
* MariaDBMySQL Server

Avatar of undefined
Last Comment
Ryan Chong

8/22/2022 - Mon