I'm trying to export from a SQL Server database into a main frame. In the SQL Server database I have a table like this:
What I'd like to do is use the Quantity field to duplicate a Product row that number of times. So my output would look like this:
How do I write a query to do this?
Code:
Quantity ProductName ModelNum
-------- ----------- --------
3 CISCON ATTW
2 TRANCO TRWS
What I'd like to do is use the Quantity field to duplicate a Product row that number of times. So my output would look like this:
Code:
ProductName ModelNum
----------- --------
CISCON ATTW
CISCON ATTW
CISCON ATTW
TRANCO TRWS
TRANCO TRWS