Created
July 4, 2013 15:55
-
-
Save mikebuchanon/5928787 to your computer and use it in GitHub Desktop.
Another example of using SQL Variables in the ANGEL SQL Query Manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SQLVAR: $course_id$ = [?Enter the Course ID in question] | |
SQLVAR: $login_name$ = [?Enter the loginname of the student in question] | |
SQLVAR: $filter$ = [?Enter a filter %quiz 02%, %02%, etc or % for all] | |
select ll.course_id, a.loginname, lo.TITLE, lo.OBJECT_TYPE, ll.access_date | |
from LSN_LOGS ll (nolock) | |
join LSN_OBJECTS lo (nolock) on lo.OBJECT_ID=ll.OBJECT_ID | |
join ACCOUNTS a on ll.USER_ID=a.USERNAME | |
where ll.COURSE_ID = $course_id$ | |
and a.LoginName = $login_name$ | |
and lo.TITLE like $filter$ | |
order by ll.ACCESS_DATE asc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment