Hard problem with query

cheberdy

Member
Local time
Today, 18:23
Joined
Mar 22, 2023
Messages
77
I have a hard problem with the following data model: I have a Warehouse entity and a Bin entity. They are connected by a 1 : n relationship. Warehouse has as key attribute a warehouse number and bin has 30 bin numbers, because there are 30 bins, and a warehouse number, which is the foreign key. I would like to achieve the following: When a new warehouse is added with new warehouse number, there should be 30 new entries in a query with the new warehouse number and from 1-30 bin numbers. Is this possible?
 
If you don't care that the result is read-only, you can use a cartesian query.
 
don't see why not - what have you tried so far?
 
I have a hard problem with the following data model: I have a Warehouse entity and a Bin entity. They are connected by a 1 : n relationship. Warehouse has as key attribute a warehouse number and bin has 30 bin numbers, because there are 30 bins, and a warehouse number, which is the foreign key. I would like to achieve the following: When a new warehouse is added with new warehouse number, there should be 30 new entries in a query with the new warehouse number and from 1-30 bin numbers. Is this possible?
Can you upload your database?
 
Have a look at how a similar problem can be addressed much more elegantly without the insert queries.
 

Users who are viewing this thread

Back
Top Bottom