Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8877845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:34:02+00:00 2026-06-14T19:34:02+00:00

I have several nested procedures. A temp table is being created in the 1st

  • 0

I have several nested procedures. A temp table is being created in the 1st one and later used at several places. Currently I have created a index on the temp table, but need to verify as I am still seeing it to run for long time.

I tried to replicate my problem following stored proc

create proc ProcSp
as
    sp_help #tmpCheck
    go
END
go

I get error "Incorrect Syntax near sp_help".

Please let me know how would we be able to call sp_help on a temp table inside a proc?

Edit

Is there any way to just display indexes on any table inside a proc?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:34:03+00:00Added an answer on June 14, 2026 at 7:34 pm

    sp_help is a stored procedure so like all stored procs in needs to be called via exec

    However in this case if you want to confirm the index has been created then it is better to check it when the index is created. Do this by looking at the @@error variable just after you create the index, if it is zero then the index is correct

    e.g.

    create index idx_temp on #tmpCheck(field)
    set @err_code = @@error
    if @err_code <> 0
    begin
       print @err_code
       rollback ......
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a several tables nested within a table that I am parsing using
I'm wondering whether it's possible to have several nested controllers within one main one
I have several textboxes in my aspx file (not nested in any other controls),
I have code in Java that has an outer loop and several nested loops.
We have several offices around the US and one in India. Our IT department
Here's a problem I experience (simplified example): Let's say I have several tables: One
I have an application with width/height of 100%. I have several nested groups within
I have several configuration files nested like such: C:\Projects\Project_1\project1.config C:\Projects\Project_2\project2.config In my configuration I
I have a RelativeLayout with several nested LinearLayouts. By default the LinearLayouts have visiblity
I have several tabs. Each tab has several nested elements that contain checkbox input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.