Re: [sqlite] SQLite query help pls
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
Re: [sqlite] SQLite query help pls
You want to strip a complete path + name and save them as separate fields, or you already have it splitted and want to join them together ? On 10/17/2010 09:26 AM, Dickie.wild wrote: > > Hi All, > > 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 > > I have never used SQLite before and help would be great > > R > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] SQLite query help pls
Hi All, 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 I have never used SQLite before and help would be great R -- View this message in context: http://old.nabble.com/SQLite-query-help-pls-tp29983175p29983175.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users