Skip to main content
Solved

Hi, im trying to replicate some SQL querys from old database in Access. The actual database is in PostGIS. The problem is there a first query, and the second one is making a join from first one's results.


pabloolivaresm
Supporter
Forum|alt.badge.img+4

The firs one query is first query 

And the second one is second queryThen I need to do a join with this second query and create a list with the results.

I dont know if with the SQL Executor transformer I can replicate this two querys.

 

Any idea?

 

Thanks

Best answer by ctredinnick

Yeah, you should be able to write it in one statement using a CTE. ie

 

with _FME_Gare_ETC_SQ as (

SELECT ...

)

 

SELECT ...

FROM Gare LEFT JOIN _FME_Gare_ETC_SQ ON ...

View original
Did this help you find an answer to your question?

2 replies

ctredinnick
Supporter
Forum|alt.badge.img+18
  • Supporter
  • Best Answer
  • December 5, 2023

Yeah, you should be able to write it in one statement using a CTE. ie

 

with _FME_Gare_ETC_SQ as (

SELECT ...

)

 

SELECT ...

FROM Gare LEFT JOIN _FME_Gare_ETC_SQ ON ...


pabloolivaresm
Supporter
Forum|alt.badge.img+4
ctredinnick wrote:

Yeah, you should be able to write it in one statement using a CTE. ie

 

with _FME_Gare_ETC_SQ as (

SELECT ...

)

 

SELECT ...

FROM Gare LEFT JOIN _FME_Gare_ETC_SQ ON ...

yeah! thanks @ctredinnick​ I tryed in PGADMIN4 and it works fine. In FME I had to add some file as iniciator for SQL Executor.

 

Thanks


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings