On Thu, Nov 5, 2009 at 1:28 PM, Rodney Cocker <rodneycoc...@hotmail.com> wrote: > > I ran the following SQL command > > UPDATE local_episodes > SET EpisodeFilename = 'j:' || SUBSTR(EpisodeFilename, > 3,LENGTH(EpisodeFilename)) > WHERE SUBSTR(EpisodeFilename,1,3)='F:\' > > Which worked perfectly, but when I went to run it the next time to change any > files stored on my H: drive it didn't work. > > I performed several tests and I can change either all the records on the F: > drive or all the records on the H: drive but not both. > > It seems that after the first command, it won't work a second time. > > I even tried: > > UPDATE local_episodes > SET EpisodeFilename = 'j:' || SUBSTR(EpisodeFilename, > 3,LENGTH(EpisodeFilename)) > WHERE SUBSTR(EpisodeFilename,1,3)='F:\' OR SUBSTR(EpisodeFilename,1,3)='H:\' > > But this results in none of the records being changed. > > Any ideas as to the cause of this behaviour? > >
No enough information to generate any ideas whatsoever. From what you describe, the following works for me sqlite> CREATE TABLE local_episodes (EpisodeFilename TEXT); sqlite> INSERT INTO local_episodes VALUES ('F:\somefile'); sqlite> INSERT INTO local_episodes VALUES ('F:\someother file'); sqlite> INSERT INTO local_episodes VALUES ('H:\a file on h drive'); sqlite> INSERT INTO local_episodes VALUES ('H:\another file on h drive'); sqlite> SELECT * FROM local_episodes; EpisodeFilename --------------- F:\somefile F:\someother file H:\a file on h drive H:\another file on h drive sqlite> UPDATE local_episodes ...> SET EpisodeFilename = 'j:' || Substr(EpisodeFilename, 3, Length(EpisodeFilename)) ...> WHERE Substr(EpisodeFilename, 1, 3)= 'F:\'; sqlite> SELECT * FROM local_episodes; EpisodeFilename --------------- j:\somefile j:\someother file H:\a file on h drive H:\another file on h drive sqlite> UPDATE local_episodes ...> SET EpisodeFilename = 'j:' || Substr(EpisodeFilename, 3, Length(EpisodeFilename)) ...> WHERE Substr(EpisodeFilename, 1, 3)= 'H:\'; sqlite> SELECT * FROM local_episodes; EpisodeFilename --------------- j:\somefile j:\someother file j:\a file on h drive j:\another file on h drive sqlite> -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu ----------------------------------------------------------------------- Assertions are politics; backing up assertions with evidence is science ======================================================================= Sent from Madison, Wisconsin, United States _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users