Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- update res_user set date_of_birth= '1991-07-30' where name = 'USER1';
- update res_user as ru set
- date_of_birth = n.date_of_birth
- from (values
- ('1991-07-30','User1'),
- ('1980-06-30','User2'),
- ('1975-02-12','User3'),
- ) as n(date_of_birth, name)
- where n.name = ru.name;
- ERROR: column "date_of_birth" is of type date but expression is of
- type text
- LINE 2: date_of_birth = n.date_of_birth
- ^
- HINT: You will need to rewrite or cast the expression.
Add Comment
Please, Sign In to add comment