> Declare TempParam int
No. In your case, EventID in the column lis is used as an alias name for the
TempParam column, which is NULL for all rows of the masterEvent table. You
get one row only returned because of the Where clause.
Dejan Sarka, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com
Please reply only to the newsgroups.
PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org