SQL-Viewer 2.4 [Script] 2009-10-25
-
- Posts: 709
- Joined: Tue Dec 12, 2006 5:32 pm
- Location: The Netherlands
Re: SQL-Viewer 2.4 [Script] 2009-10-25
I hope i'm not too annoying as a n00b asking this most likely very simple question: what query do i use to get the artist and title of a specific songid?
-
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: SQL-Viewer 2.4 [Script] 2009-10-25
SELECT Artist, SongTitle FROM Songs WHERE ID = 'replace ID here'
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Re: SQL-Viewer 2.4 [Script] 2009-10-25
I want change a song path. Initially root of path is ":\_Music\Andrey\", I want change this to ":\_MM_MEDIA\". I execute next query:
Query executed without errors, but field SongPath not changed. Why? How I can change this field?
PS: sorry for my english...
Code: Select all
UPDATE Songs SET SongPath = REPLACE(SongPath, '@_Music\Andrey', '@_MM@_MEDIA');
PS: sorry for my english...
I do not speak English, so forgive me for my english
Re: SQL-Viewer 2.4 [Script] 2009-10-25
This should do it, but please back up your database first!
Code: Select all
UPDATE Songs SET SongPath = REPLACE(SongPath, ':\_Music\Andrey\', ':\_MM_MEDIA\')
WHERE SongPath like ':\_Music\Andrey\%';
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Re: SQL-Viewer 2.4 [Script] 2009-10-25
Thanks, it's working)Bex wrote:This should do it, but please back up your database first!Code: Select all
UPDATE Songs SET SongPath = REPLACE(SongPath, ':\_Music\Andrey\', ':\_MM_MEDIA\') WHERE SongPath like ':\_Music\Andrey\%';
I do not speak English, so forgive me for my english
Re: SQL-Viewer 2.4 [Script] 2009-10-25
Is it safe to use SQL Viewer 2.4 with MM4?
-
- Posts: 5559
- Joined: Wed Feb 07, 2007 11:07 pm
- Location: New Jersey, USA
- Contact:
Re: SQL-Viewer 2.4 [Script] 2009-10-25
I've used it with mm4 but I have not tested it with any of the new fields that are in mm4.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Link to Favorite Scripts/Skins
Join Dropbox, the online site to share your files
Re: SQL-Viewer 2.4 [Script] 2009-10-25
Can someone help me out? I also need to change the folder name. But the folders are on a different PC, within the same network group.
It was: \\Algemeen\d\mp3\
must be: \\Algemeen\mp3\
Can you please make the query for me? I'm totally not experienced and am afraid I will screw it all up.
It was: \\Algemeen\d\mp3\
must be: \\Algemeen\mp3\
Can you please make the query for me? I'm totally not experienced and am afraid I will screw it all up.
Re: SQL-Viewer 2.4 [Script] 2009-10-25
If I understand you correctly this should do it, but please back up your database first!
Code: Select all
UPDATE Songs SET SongPath = REPLACE(SongPath, '\\Algemeen\d\mp3\', '\\Algemeen\mp3\')
WHERE SongPath like '\\Algemeen\d\mp3\%';
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Re: SQL-Viewer 2.4 [Script] 2009-10-25
Hmmm... did not do the job jet. I went to the folder in MM. Selected all those entries. Then started the Script SQL viewer. Entered the code in the big box in the middle and hit RUN Select Query. It took about 7 seconds and 0 rows.
I'm totally new to SQL viewer. Maybe I do sth wrong?
I'm totally new to SQL viewer. Maybe I do sth wrong?
Re: SQL-Viewer 2.4 [Script] 2009-10-25
SQL can only change the path in MM's database. But I guess that's what you want to do?
1. What is the incorrect path in your database?
2. What do you want to update it to in MM's database?
1. What is the incorrect path in your database?
2. What do you want to update it to in MM's database?
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Re: SQL-Viewer 2.4 [Script] 2009-10-25
Hi. I have a quite similar problem, but I can't get it SQL-Viewer to do the work:
I changed the volume character (from H: to N:) on an external drive containing my music and also the path to the music folder:
old: H:\jaBU\iMusic\
new: N:\2 Music\
Then I opened MM and found all my music, under the new drive letter, but within the old path: N:\jaBU\iMusic\
All songs are displayed black, but when trying to play, they turn grey and don't play.
I am completely new to SQL-Viewer and have no coding experience whatsoever. I entered the following into the window:
Then I hit 'Run Select Query' (although I am not sure what the buttons mean): 0.234 sec, nothing happens (except #____ in the bottom window).
Then I hit 'Execute DDL/DML Statement': Information window 'Statement Successfully Executed in 0,344 sec'
Nothing has changed with the songs.
Please help
I changed the volume character (from H: to N:) on an external drive containing my music and also the path to the music folder:
old: H:\jaBU\iMusic\
new: N:\2 Music\
Then I opened MM and found all my music, under the new drive letter, but within the old path: N:\jaBU\iMusic\
All songs are displayed black, but when trying to play, they turn grey and don't play.
I am completely new to SQL-Viewer and have no coding experience whatsoever. I entered the following into the window:
Code: Select all
UPDATE Songs SET SongPath = REPLACE(SongPath, '\\jaBU\iMusic\', '\\2 Music\')
WHERE SongPath like '\\jaBU\iMusic\%';
Then I hit 'Execute DDL/DML Statement': Information window 'Statement Successfully Executed in 0,344 sec'
Nothing has changed with the songs.
Please help

Re: SQL-Viewer 2.4 [Script] 2009-10-25
Actually, changing the drive letter would still make the songs playable since MM uses the driveID of a drive to locate it. The reason it doesn't work now is that you have changed the folder. To make it work again, do like this:
1. Back up your database!
2. Run this statement: (Use either button.)
3. Let me know it it worked.
1. Back up your database!
2. Run this statement: (Use either button.)
Code: Select all
UPDATE Songs SET SongPath = REPLACE(SongPath, ':\jaBU\iMusic\', ':\2 Music\')
WHERE SongPath like ':\jaBU\iMusic\%';
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Re: SQL-Viewer 2.4 [Script] 2009-10-25
Hey, thanks, it worked. Took quite some time, but with 12500 songs, no wonder.
Don't forget to restart MM!
What's the difference between \\xyz\ and :\xyz\
I would have thought that the \\xyz searches anywhere in the path, whereas :\xyz searches only including the leading colon from right after the drive letter?
Don't forget to restart MM!
What's the difference between \\xyz\ and :\xyz\
I would have thought that the \\xyz searches anywhere in the path, whereas :\xyz searches only including the leading colon from right after the drive letter?
Re: SQL-Viewer 2.4 [Script] 2009-10-25
Great, how long time did it take? (It should be pretty fast.)
The driveletter is not stored in the path field in the database. I.e all paths starts with :\xyz\. If you use UNC path then do the paths start with \\xyz\ (\\DEVICENAME\folder).What's the difference between \\xyz\ and :\xyz\
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!
All My Scripts