0
I have a table called Teste de aluno
and a call Parametros
I need to create a Query that compares if the test is in accordance with the Parameters
The problem is that the tables are not 100% similar
Test Table:
IDTESTE
PARAMETRO1
PARAMETRO2
PARAMETRO3
PARAMETRO4
PARAMETRO5
PARAMETRO6
PARAMETRO7
PARAMETRO8
PARAMETRO9
PARAMETRO10
IDANO
IDMATRICULA
IDALUNO
Table Parameter:
IDPARAMETRO
IDANO
PARAMETRO1
PARAMETRO2
PARAMETRO3
PARAMETRO4
PARAMETRO5
PARAMETRO6
PARAMETRO7
PARAMETRO8
PARAMETRO9
PARAMETRO10
Is there any way via Oracle to perform this comparison and check if the data matches?
I checked the controls MINUS
, INTERSECT
and CASE
... but I thought it was kind of hazy and how would I do it...
How do the data relate ? I believe a simple JOIN solves.
– Motta
The two tables do not relate to each other
– MarceloBoni
But if the tables don’t have a relation how to compare them, go to something like a test.IDTESTE = parameter.idIDPARAMETRO and test.idano = parameter.idano , but it doesn’t seem to be this way.
– Motta
Then, the parameter table literally only serves as a parameter to know which tests validate the students
– MarceloBoni
Do not understand, try to improve your initial explanation. Maybe with examples.
– Motta
You first need to know with which parameter of the table parameters you want to compare your test. Because in the table parameters by name, I think it can store N records of different parameters. Or an alternative would be you create a parameter table fk inside the table testeDeluno, but there would have been no sense to store the parameters in table testeDeluno.
– David Melo