Ticket #5452: create view v_music_artists.sql

File create view v_music_artists.sql, 376 bytes (added by jonathan@…, 13 years ago)

CREATE VIEW statement for v_music_artists statement

Line 
1CREATE OR REPLACE VIEW  `mythconverg`.`v_music_artist` AS SELECT IF(artist_name LIKE 'the %' OR artist_name LIKE 'a %', CONCAT(TRIM(MID(artist_name, INSTR(artist_name, ' ') + 1, LENGTH(artist_name) - INSTR(artist_name, ' '))), ' (', LOWER(TRIM(LEFT(artist_name, INSTR(artist_name, ' ')))), ')'), artist_name) AS `artist_name`, artist_id FROM music_artists ORDER BY artist_name