Creating user – course enrollments based on membership on existing courses

DECLARE @AY varchar(7);
SET @AY = '2013-14';
SELECT DISTINCT USERS.Batch_uid, 'DEPT-I-0001' FROM Users
JOIN COURSE_USERS ON COURSE_USERS.users_pk1 = USERS.PK1
JOIN COURSE_MAIN ON COURSE_USERS.crsmain_pk1 = COURSE_MAIN.PK1
WHERE COURSE_MAIN.lower_course_id in ('rd23520_'+@AY,'rg23520_'+@AY,'br23420_'+@AY,'bg23420_'+@AY)
AND COURSE_USERS.ROLE = 'S'