Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. campbeltr

    Stored Procedure runs slow, but same code in query window runs fast.

    have the proc and the code in 1 window, hit CTRL + K (in query analyzer) then F5" I know doesn't sound dificult, but somehow it is stumping me. I notice you mention the use of "query analyzer", which I am familiar with in SQL Server 2000, though I am currently using SQL Server 2005. Is there a...
  2. campbeltr

    Stored Procedure runs slow, but same code in query window runs fast.

    Were these the execution plans not useful, too large, or unreadable? I am still stumped by this, so any thoughts would be appreciated.
  3. campbeltr

    Stored Procedure runs slow, but same code in query window runs fast.

    Query in New Window... StmtText -------------------------------------------------------------------------------------------------------------- declare @nId int--, declare @nUserLang int set @nId = 13067 set @nUserLang = 1 declare @uAgid uniqueidentifier select @uAgid = AuditGlobalId...
  4. campbeltr

    Stored Procedure runs slow, but same code in query window runs fast.

    Okay, I've done that. Unfortunately, this looks like a lot to slog through, but if anyone is willing to skim through it an give your thoughts, I'd really appreciate it. Actual Stored Procedure... StmtText...
  5. campbeltr

    Stored Procedure runs slow, but same code in query window runs fast.

    SQLDenis, Thank you for your reply, and I did of course read your previous reply. In response to that first reply, I posted the actual code that I am trying to work with. However, based on your most recent note, that doesn't seem to be what you were looking for. So, I am sorry to say that I do...
  6. campbeltr

    Stored Procedure runs slow, but same code in query window runs fast.

    The actual stored procedure... (obtained via Modify) ALTER PROCEDURE [dbo].[SubCatInfo] @nId int, @nUserLang int AS declare @uAgid uniqueidentifier select @uAgid = AuditGlobalId from Audit where WebAuditId = @nId CREATE TABLE #GetCats( nOrder int NOT NULL...
  7. campbeltr

    Stored Procedure runs slow, but same code in query window runs fast.

    I am having trouble with a stored procedure running very slowly in comparison to the same code running very quickly in a separate query window. The Stored Procedure runs in 2 1/2 minutes, but the direct query runs in 1 second. Some notes: - I am using SQL Server 2005. - The query is NOT using...
  8. campbeltr

    nTEXT to nVARCHAR(MAX)

    No thoughts on this?
  9. campbeltr

    nTEXT to nVARCHAR(MAX)

    I added DISTINCT to a statement, and because I added DISTINCT I also had to CAST an nTEXT datatype field in the SELECT statement to nVARCHAR. I chose to use nVARCHAR(MAX) in this case, since I have read that nTEXT is being depreciated and nVARCHAR(MAX) is the recommended substitute. However...

Part and Inventory Search

Back
Top