Selection Using FROM TABLE

0

I have a table and a function that returns a pipeline, but the function needs to receive a data from the first table, I thought the selection would look something like this:

Select FERRAMENTA.IDFERRAMENTAS
 FROM SIG_SERVICOSFERRAMENTAS FERRAMENTA
INNER JOIN TABLE(SELECT TEXTO1,DATA1,DATA2 FROM TABLE(LIDER.PKG_EQP.FN_FERRAMENTA_ETQ(FERRAMENTA.IDFERRAMENTAS))) VALIDADE
 ON 1 = 1 

and I'm getting the following error:

  

TOOL.INFORMATIONIDER

I've done similar queries, I know the error should be something small in the selection, but I can not find it.

    
asked by anonymous 23.10.2017 / 14:59

1 answer

1

The scope of your second subselect ( SELECT TEXTO1,DATA1,DATA2... ) can not "see" the FERRAMENTA.IDFERRAMENTAS field.

Try removing it and see if you get the expected result, as follows:

SELECT FERRAMENTA.IDFERRAMENTAS
FROM SIG_SERVICOSFERRAMENTAS FERRAMENTA
INNER JOIN TABLE(LIDER.PKG_EQP.FN_FERRAMENTA_ETQ(FERRAMENTA.IDFERRAMENTAS)) VALIDADE
ON 1 = 1 
    
23.10.2017 / 15:08