SQL access: row duplication based on quantity

I am very new to SQL, and I want to ask your help to find a “general” solution to my problem, described below:

I have a table like: (table name: test)

ID  | Item  | Qty  
1   | apple | 3
2   | peach | 2

I want to find a solution that gives me the result:

Item 
apple
apple
apple
peach
peach

Is there a way to handle this in Access SQL?

+4
source share

Source: https://habr.com/ru/post/1690716/


All Articles