On 17 Oct 2010, at 1:26pm, Dickie.wild wrote:

> I was hoping for a little help, well little would be an understatement, I
> currently have a file location in a field and i would like to take all of it
> up untill the last / (folder) and copy it in to another column and then
> attach folder.jpg on the end. So the end result ends up being something like
> c:\rich\Eminem\folder.jpg

SQLite has a whacky 'rtrim()' function which can trim things other than 
whitespace. So work out which characters you want to strip from after the last 
'/', presumably something like

'abcd... ABCD... 123... ._'

and do something like

UPDATE locations SET jpegPath TO (rtrim(filePath, 'abcd... ABCD... 123... ._') 
|| 'folder.jpg')

I haven't tried it but it might work.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to