Guest User

Untitled

a guest
Oct 17th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. update res_user set date_of_birth= '1991-07-30' where name = 'USER1';
  2.  
  3. update res_user as ru set
  4. date_of_birth = n.date_of_birth
  5. from (values
  6. ('1991-07-30','User1'),
  7. ('1980-06-30','User2'),
  8. ('1975-02-12','User3'),
  9. ) as n(date_of_birth, name)
  10. where n.name = ru.name;
  11.  
  12. ERROR: column "date_of_birth" is of type date but expression is of
  13. type text
  14. LINE 2: date_of_birth = n.date_of_birth
  15. ^
  16. HINT: You will need to rewrite or cast the expression.
Add Comment
Please, Sign In to add comment