4/07/2011

User enrollment with data_source batch_uid for user, course, and enrollment

SELECT cu.pk1,
u.user_id,
cm.course_id,
dsc.batch_uid as Cds,
dsu.batch_uid as Uds,
dscu.batch_uid as CUds,
cu.available_ind,
cu.row_status,
cu.dtmodified
FROM course_users cu
INNER JOIN users u on cu.users_pk1 = u.pk1
INNER JOIN course_main cm on cu.crsmain_pk1 = cm.pk1
INNER JOIN data_source dscu on cu.data_src_pk1 = dscu.pk1
INNER JOIN data_source dsu on u.data_src_pk1 = dsu.pk1
INNER JOIN data_source dsc on cm.data_src_pk1 = dsc.pk1
WHERE u.user_id = 'auser' and cm.course_id LIKE '%S12011'

1 comment:

  1. Brett,

    These are awesome! Thank you for doing this. I see your system is using BBLEARN instead of BB_BB60 (I'm guessing eventually ours will be converted in one of the future versions, too).

    Scoee

    ReplyDelete