Re: database update question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Is there a way to change all the entries from .pdf to .zip without
> writing an update statement for each individual row?

UPDATE table_name SET col_name = LEFT(col_name, LEN(col_name) - 4) +
'.zip' WHERE col_name LIKE '%.pdf'


   -j.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux