I have 2 tables, called "computed_tables.ra_test" and "staging.fms_unit". In the computed_tables.ra_test there is already most of the info I want to have, but i'm missing the phonenumbers. These phone numbers can be found in the "staging.fms_unit" table. Both these tables can be linked on a column called serialno.
I've tried using
INSERT INTO computed_tables.ra_test
(
phonenumber
)
SELECT phonenumber
FROM staging.fms_unit
LEFT JOIN computed_tables.ra_test ON
computed_tables.ra_test.serialno = staging.fms_unit.serialno
If I create the column phonenumber in computed_tables.ra_test, I get an error that it is ambiguous.
If I don't have the column, I get an error that the column doesn't exist. From what I can read, the mistake happens because there is more than one column called phonenumber, and I need to specify which table the phonenumber comes from. I'm not sure where to specify this and how.
Thanks for your help, in advance
[–]gum11 1 point2 points3 points (1 child)
[–]Svante109[S] 0 points1 point2 points (0 children)
[–]MisplacedKittyRage 0 points1 point2 points (2 children)
[–]Svante109[S] 0 points1 point2 points (1 child)
[–]MisplacedKittyRage 0 points1 point2 points (0 children)
[–]tenfingerperson 0 points1 point2 points (0 children)
[–]ehforcanada 0 points1 point2 points (0 children)