1

I have table (SQL MS ACCESS)

COUNTRY   NO_OF_PAGES
FRANCE    2 
UK        4
GERMANY   1

I want output

COUNTRY   NO_OF_PAGES
FRANCE    1
FRANCE    2
UK        1
UK        2
UK        3
UK        4
GERMANY   1

1 Answer 1

1

I create number table which contain value from 1 to 10,you may populate it with more as per your requirement.

Table name tblNumber (RowNumber number)

SELECT country, rownumber
FROM tblNumber AS N INNER JOIN table3 AS t ON n.rownumber<=t.noofpages;

here table3 is your table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.