Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
sqlite replace values

I have one table in sqlite called images and it contains a column named "index" and i have created another column which is empty and is named tilename. the first column index has values like 2530CA_16 and 2832AB_13 and would like the same values to be inserted into the new column called tilename but without the _ for example i want it to be like old column "index" value 2530CA_16 should be newcolumn tilename value 2530CA16

share|improve this question

marked as duplicate by Mapperz Dec 12 '12 at 20:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I'm not sure this is really a good fit for GIS.SE, but perhaps you can make the data available and show the code you've currently tried? Clearly the answer is going to involve some kind of UPDATE images SET tilename = substr(index,1,6) + substr(index,7,8) but I'd like to make sure the solution fits with your needs.

share|improve this answer
the solution does not completely work as it just shows the first four digits only whilst it is supposed to show all the values except the _ only. for instance 2530CA_16 should become 2530CA16. i do not have a clue because i thought the update would do it as well but specifically i do not know – kartoza-geek Dec 12 '12 at 10:38
Does "first four digits" mean "2530" in this case? Can I again ask that you make available the data and the code that you have - its hard to understand the issue from your description. – BradHards Dec 12 '12 at 19:56
thanks for the help i solved it, i had a table with a column "index" which had values 2530CA_16 and it was supposed to be transfered to the other column so that it became 2530CA16. so i did the following – kartoza-geek Dec 13 '12 at 8:49
update table set tilename=index and then update images set tilename = replace (tilename,'_', '') – kartoza-geek Dec 13 '12 at 8:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.