简体   繁体   中英

Invalid Object name error?

I have this stored procedure that import an excel file then by using queries it create the reports that I want then it export the tables that were created by them.

the problem is that when I import the excel file the rest of the code doesn't see the table that was imported and I have to refresh my database to see the imported table.

在此输入图像描述

well as you can see the job that import the file works fine, but the rest of code can not see the table.

Is there any way to fix this problem?

Try with the below method.

Inside the procedure ,change the TableName to 3 part as '[database name].dbo.[tablename].

Say if the table [New LP] is created in the database abc,change the table name inside the procedure as [abc].dbo.[New LP].

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM