change some PostgreSQL fiels in a table

Home
Photography
Projects
About me
Robots
Publications
Friends' pages:
Chris
Jeff
John
Minu
Raeed
Email me:
alex AT joni.ro


Share

UPDATE purchase_order set name=substring(name for 3) || '_' || substring(name from 4) || '_2010' WHERE id > 35 and id < 57;


This changes the name field in the purchase_order table of the current DB.

The new value will be = first 3 chars of the old value with '_' appended, then the rest of the original text + '_2010'.

Only fields where id is > 35 and < 57 are affected.




[æ]