Want to know if it is at all possible to capture the calling query... example
SELECT SITE,NAME,COUNT(ITEMS) FROM SQLVIEW1 WHERE NAME = 'JIM'
in the SQL view it has something like this
DECLARE VAR1
where VAR1 would equal the above query that triggered the procedure.
"SELECT SITE,NAME,COUNT(ITEMS) FROM SQLVIEW1 WHERE NAME = 'JIM'"