i wonder if the following situation is doable in one statement.
There are two tables or selects
select ID from portfolio where show = true;
select ID from disciplines;
the combination of both selections should be inserted in another table.
So each ID from the first select should be combined with each ID in the second select and inserted in the third table.
How can you be sure they will be unique? Is the ID a generated identity - if so then there is no way to guarantee they are unique.
Further problem - once you have the data in this other table, how do you know that the ID value of 1234 is a portfolio vs a discipline? Since the ID value comes from 2 different tables you no longer have any way of validating the ID, nor do you have any way of relating this new table back to the original source.
What problem are you trying to solve here? What is the end goal?
because they are the primary key, teh end goal is as follows.
Two tables : Disciplines and Portfolio
Two selects : - select ID from disciplines -> ( f.i 1,2,3)
select ID from portfilio where show - true -> ( f.i. 10,11)
i want to add records to a third table called projectdisciplines, i want a combination of the first and second select, into a third column.
This the would be
10,1
10,2
10,3
11,1
11,2
11,3