0

Hi i have a two stored procedure a and b, b called by a, in a one temp tables created and in the sp b trying to access temp table of sp a, at compile time getting error for missing object.

Yogendra Bhardwaj
  • 95
  • 1
  • 3
  • 13

2 Answers2

2

The compiler checks for all objects mentioned in your SQL without checking if they are created during execution.

You could create the temp table and then in the same session create the procs, that should work.

You can then drop the temp table.

1

Seriously? Version 11? Wow.

Any way, try adding "create table" for the temp table before creating sproc b.

Phlamingo
  • 31
  • 2