SELECT SQL - Join with created fields

Asked

Viewed 38 times

0

I need to make a Join with the product of two SELECTbut I’m not getting to an understanding.

I need the columns created (notificacao) in tabs the tables are compared and return me the data of the complete panel stack, even if not identified in the table robo.

Table: robot

SELECT REPLACE(id_notificacao,'RIxRE-',"") AS 'notificacao',data_input AS 'data_escrita'
FROM robo
WHERE id_notificacao LIKE 'RIxRE%' AND MONTH(data_input) >4*

Table: panel

SELECT CONCAT(id_notificacao,'-',ci_sigla) AS 'notificacao',dt_confirmada AS 'data_tratamento'
FROM painel

1 answer

0

Try it like this

Select *
From painel
Left join robo on robo.id_notificacao = painel.id_notificacao
WHERE id_notificacao LIKE 'RIxRE%' AND MONTH(data_input) >4*
  • Thank you so much for your help!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.