David thanks for your response...
I tried $(UserID) in my query and it did not work...
But
SELECT Username
FROM {objectQualifier}Users
WHERE UserID = $(UserID)
works fine.
The example query in my original post does not show I have to use 3 tables to get user's Company Name to display from UserID
table1 CompanyDetails contains Company Name, CompanyID
table2 ContactDetails contains Username, CompanyID
table3 Users contains Username, UserID
Is there some limit to the query that can be used?
I've read suggestions from Chad to use SProcs for this but don't know how. Is there an example for using stored procedures in the module's SQL token key?