1
Hello, I have a question about a select chained. I found many examples with
select * from (select campo from tabela)
But I want to define the fields of my query, as below:
select campo1,campo2,(select campo1 from tabela2) from tabela1
The point is that inside the select I need a Where with a column displayed
select campo1,campo2,(select campo1 from tabela2 where id=campo1) from tabela1
How can I index to search for another column?
if you do not use Where will return all elements of your table2 which is not allowed within select, you actually have all the values of a table in a field of a select ?
– Marco Souza
I will comment on the actual case without examples 1 minute
– Felipe Franco
I guess the mistake is just because you put two Where
WHERE TPMOV <> 3 WHERE AG_MTARC.SEQ_TAREFA = AG_MMOV.SEQ_TAREFA
exchanges the second forAND
– rLinhares
That’s right, vlws! how do I close the post?
– Felipe Franco