How to add dummy rows in MakeTable Query - Access 2000?

后端 未结 2 1040
隐瞒了意图╮
隐瞒了意图╮ 2021-01-14 19:54

I have this picture:

As you can see the field \"promet\" can go from 1 to 9. However for tipprod = \"02\" promet has values of 1, 2, 3, 5 and 7.

I want to a

相关标签:
2条回答
  • 2021-01-14 20:02

    Years ago I wrote an article about this. It is still on-line:

    Find and Generate Missing Values in an Access Table

    It lists the numbers missing, but you should be able to modify the code to also append these to the table.

    0 讨论(0)
  • 2021-01-14 20:16

    Going for a pure SQL answer:

    First, create a query that returns the dummy variables:

    SELECT A.tipprod, B.promet
    FROM
    (SELECT DISTINCT tipprod FROM T11_nezbirni) AS A, (SELECT DISTINCT promet FROM T11_nezbirni) AS B
    

    And then just left join the rest of your query to that on tipprod and promet

    0 讨论(0)
提交回复
热议问题