Has anyone ever run across the problem that an object (in this case, a view)
created in a dbo-owned stored procedure can not later be referenced in that
stored procedure? Running 'sp_help viewname' tells me that the object
exists and that I am the owner of it, however, when it's referenced in the
stored procedure, I am getting an "Invalid object name" error when I try to
select from the view.
Here is a mightily watered-down version of what I'm doing:
select idvalue = max(id_field) from test_table';
/* at this point, running 'sp_help tmp_view' shows me that tmp_view exists
and is owned by me */
"Invalid object name" */
drop view tmp_view;
return
I'm running this proc by calling it like this:
The issue seems to be that the proc is owned by dbo. Any idea how to work
my way around this issue?
Thanks,
Laura