by Quebec » Thu Jan 08, 2009 5:34 am
Cheers for the heads up on concatenation, saw an example on some SQLite forum that used the standard operator so kind of just assumed it was ok. The substrings are correct though. Substr(SongPath, 1) removes the first character (:) and leaves everything else, so concatenating ':\Music' with the substring of ':\My Music.....' gives ':\Music\My Music....' which is what I want.
I have tested all the different bits out in a select statement:
SELECT SongTitle, ':\Music' || SUBSTR(SongPath, 1) FROM Songs WHERE SUBSTR(SongPath, 0, 10) = ":\My Music";
That works perfectly, outputting precisely the path I want it to. However copy and pasting those statements into an UPDATE statement:
UPDATE Songs SET SongPath = ':\Music' || SUBSTR(SongPath, 1) WHERE SUBSTR(SongPath, 0, 10) = ":\My Music";
Gives these 'no function: 'gettracktype(1, 1)' messages. I was just using Media Monkey generally and got the same error yesterday as well. Unfortunately I can't actually remember precisely where but it leads me to think its some idiosyncrasy of SQLite or Media Monkey's use of it? Has anyone else had the same error? I'm fairly sure that the statement above constituets legal SQL that does what I want it to.
Cheers for the heads up on concatenation, saw an example on some SQLite forum that used the standard operator so kind of just assumed it was ok. The substrings are correct though. Substr(SongPath, 1) removes the first character (:) and leaves everything else, so concatenating ':\Music' with the substring of ':\My Music.....' gives ':\Music\My Music....' which is what I want.
I have tested all the different bits out in a select statement:
SELECT SongTitle, ':\Music' || SUBSTR(SongPath, 1) FROM Songs WHERE SUBSTR(SongPath, 0, 10) = ":\My Music";
That works perfectly, outputting precisely the path I want it to. However copy and pasting those statements into an UPDATE statement:
UPDATE Songs SET SongPath = ':\Music' || SUBSTR(SongPath, 1) WHERE SUBSTR(SongPath, 0, 10) = ":\My Music";
Gives these 'no function: 'gettracktype(1, 1)' messages. I was just using Media Monkey generally and got the same error yesterday as well. Unfortunately I can't actually remember precisely where but it leads me to think its some idiosyncrasy of SQLite or Media Monkey's use of it? Has anyone else had the same error? I'm fairly sure that the statement above constituets legal SQL that does what I want it to.