Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Posts
    21

    Exclamation Unanswered: temp tables in nested procs

    Hi all!
    I am writing a proc that has to be executed by another proc, but it uses temp table created in first proc. When I am trying to create the proc it says that table is not found.
    Example

    create proc1
    as

    begin
    crete table #abc( column1 int,
    column2 int)
    exec proc2
    end

    create proc2
    as
    begin
    insert#abc values(1,1)
    end

    and message i am getting when cretating proc2 is this
    Number 208 severity 16 state 1 #abc not found

    How should create them so it works?

  2. #2
    Join Date
    Jun 2003
    Posts
    140

    Post

    create table #abc from outside the proc
    create proc2
    drop table #abc
    create proc1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •