Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    101

    Unanswered: Inserting into temp table..

    Hi,
    I have a proc, if i run that proc from query analyzer it completes in 12 sec.
    I want those results to be inserted into temp table. When i try to insert the results from Stored proc to temp table it is taking 5 min.

    What could be the cause of the problem?
    Any help would be greately appreciated.
    sskris

  2. #2
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276
    hi, can you write the sp here?
    you check the lock?
    Thanks

  3. #3
    Join Date
    Apr 2004
    Posts
    101
    create Table #Total
    (
    Total float
    ,PercentTot float
    )

    insert #Toral
    (
    Total
    ,PercentTot
    )

    exec dbo.p_Details

  4. #4
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276
    hi again,
    this is correct? (the insert )
    may be you can test, insert into a temp table, not with create statenent
    for example.

    select col1, col1
    into #myTemp
    from myTable

    and, please, do you write the stored procedure code?

  5. #5
    Join Date
    Apr 2004
    Posts
    101
    The insert is correct.. When i execute the same code, it take 5 min..when i execute just proc it completes in 12 sec..

Posting Permissions

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