0
I just created a field on my table reporterio_psi called convenio
.
I have a table called patients, which also has a field called convenio
, where they have data in this field.
In these two tables, they have a field that the data is equal.
pacientes
&nomes
I’m trying to pass on the field data convenio
to the table reporterio_psi and for some reason I’m not getting...
Code:
INSERT INTO relatorio_psi(convenio)
SELECT convenio from pacientes
WHERE relatorio_psi.paciente = pacientes.nome;
The fields convenio
are of the VARCHAR type.
ERROR: #1054 - Unknown 'reporio_psi.patient' column under 'Where clause'
What a mistake you’re making?
– adventistaam
#1054 - Report column 'psi.patient' unknown in 'Where clause'
– Leticía
The table
relatorio_psi
has the patient `column``?– adventistaam
Yes... database
– Leticía
It wouldn’t be an update you’re trying to do?
– KaduAmaral
I don’t think so, no data in the field
convenio
table reporterio_psi– Leticía
All right, the field is new, it won’t even have data, but the report table_psi has patient data?
– KaduAmaral
Yes, see there... Strange guy, I don’t know
– Leticía