Reputation: 3677
Using Amazon Redshift to update some columns
I have two tables:
Table A
A B C D
0 23as asd adf [NULL]
1 23as asd adf [NUll]
2 23as asd adf [NUll]
Table B
A B C D
0 23as asd adf 4234
1 23as asd adf 5454
2 23as asd adf 7867
I am trying to populate tableA.D with tableB.D in a join but the error I am getting is that
"SQL Error [500310] [42703]: [Amazon](500310) Invalid operation: column "d" of relation "tableA" does not exist;
[Amazon](500310) Invalid operation: column "d" of relation "tableA" does not exist;
com.amazon.support.exceptions.ErrorException: [Amazon](500310) Invalid operation: column "d" of relation "tableA" does not exist;
Here is my update/join statement:
update tableA
set d= tableB.d
from tableB
where
tableA.A= tableB.A and
tableB.C= 'Completed '
What am I doing wrong that this simple UPDATE + JOIN is not working, and it is not finding the column in the table?
Upvotes: 0
Views: 895