Hello guys,
I have a lengthy and complex SP which is generating a dynamic table at run based on some logic. This table is being used in a SSRS Report.
Now data is not available on some parameter combination and in this case this dynamic table won't get created and Report shows 'invalid table #temp'.
I want to handle it in such a way that even if no data exist and this table is not created, i should not get error that table doesn't exist. It is failing my report.
Could anyone please suggest.
TRY Drop table av end try catch end catch - this work even if table doesn't exist
TRY select * from av End try catch end catch -- this doesn't work if table doesn't exist.
Avhilash