Click to See Complete Forum and Search --> : SQL Query: Change JPG to jpg?


hominid4
02-16-2008, 02:12 PM
Hi. In my Plogger database I have 100s of image paths that point to images that have an uppercase JPG extension, I'm needing to change all of these to a lowercase jpg. The images are within "plogger_pictures" and then under the column "path":
`path`SELECT * FROM `plogger_pictures` WHERE 1

Is there a query I can run to go through all the images and change the jpg to lowercase?

Thanks.

chazzy
02-17-2008, 10:41 AM
what if you use the LOWER function? this will turn all upper case in to lower case.

hominid4
02-17-2008, 11:37 AM
Thanks, that seems to be what I need. Would I insert something like below in the query?

SELECT LOWER('JPG'); -> jpg

chazzy
02-17-2008, 12:35 PM
you would use an update statement to change the existing values, insert to change for newer values



UPDATE your_table SET this_column = lower(this_column)

Technoroj
02-27-2008, 06:08 AM
Thanks, that seems to be what I need. Would I insert something like below in the query?

SELECT LOWER('JPG'); -> jpg


Yes