IF NOT EXISTS - Do the fields need to have the same name?
maybe someone help with the "IF NOT EXISTS" syntax. Going through the previous posts, I have noticed that this EXISTS command makes the assumption that the field must have the same name (or, did I get It wrong?). But this implies that the model will make an association, or even a concatenation. But instead, I want to keep the fields independent.
I have created a nice example about a dance competition. This example reproduces EXACTLY the business problem that I have to solve at work. Here it is.
There is a dance competition. Only the first 3 solo dancers (male or female) and the first 3 couples will win the admission to the final.
The solo competition is the most important. If a dancer is participating and winning in both, he will be automatically admitted to the solo final, and his couple will be eliminated.
The jury is issuing a ranking of the first 6 solo dancers and the first 6 couples. The task is to present the list of the 3 solo winners and the 3 couple winners, so that 9 distinct people can be sent to the final.