Forum Replies Created

Viewing 15 posts - 21,076 through 21,090 (of 22,184 total)

  • RE: SQL 2005 performance issues with SP's having loops

    Most of the time, cursors just flat out run too slow. Rewriting the procedures to avoid the use of cursors is usually the best bet. Other than that, I'm not...

  • RE: Storing Statistics

    This white paper from Microsoft is one of the best sources for this information.

  • RE: 5MB Inline Inserts to TempDB

    Itzik is the greatest.

    It sounds as if you're doing some sort of data migration. If you can, you should look into, in some way, turning this into a bulk load....

  • RE: migrate tables from multiple database into one table

    The long answer is: it depends.

    Let's assume that the 8 column table is supposed to be retained in it's entirety and that you're supposed to create that, load it, and...

  • RE: Look-up Table (24ms vs 5ms)

    As you've already seen, no they're not both the same. Yes, the number of physical reads is the same, but you'll find that this procedure recompiles, a lot, probably every...

  • RE: Top N plus

    How about using a CTE within a UNION query. Something like this:

    WITH MyCTE AS

    (SELECT SalesOrderId

    ,row_number() over (order by TotalDue DESC) AS TotalRank

    ,TotalDue

    FROM Sales.SalesOrderHeader)

    SELECT TOP 5 *

    FROM MyCTE

    UNION

    SELECT *

    FROM MyCTE

    WHERE SalesOrderId...

  • RE: Select Column contents from variable

    This seriously sounds like a highly questionable approach.

    However, if you really want to do it, you need to use dynamic SQL:

    DECLARE @mySQL nvarchar(max)

    SET @mySQL = 'SELECT ' + @Column...

  • RE: Parameter Value Logging

    But if you were using SMO as a code generation utility, it wouldn't matter that you had to use the name would it? I mean if we assume that you...

  • RE: To ID, or Not to ID, That is the Question...

    I've done it both ways. The one recommendation I can make is to make this consistent with the rest of the system. If the system is using artificial and invisible...

  • RE: Bug in Profiler GUI when viewing .trc file

    I'm sorry. I really don't know at this point. We use this all the time and it works just fine.

  • RE: urgent plz help me out in small query

    Dynamic management views related to transactions are what you're looking for. But, just so you know, that's not the final answer. That's where to look in the documentation to get...

  • RE: Visual Fox Pro

    How about that fact that FoxPro is no longer in the development path (although they're supporting it through 2015)?

    Sorry, couldn't help it. I really don't know that much about FoxPro.

  • RE: Recursive UDF call within a CTE

    A CTE is very local. In fact, it's only available to the SQL query that immediately follows it, although it can be used multiple times within that query. so you...

  • RE: plz help me out in writing a small query

    Posting homework is bad enough. Cross-posting homework is getting a bit over the line. See my response on the other thread.

  • RE: urgent plz help me out in small query

    Clearly, obviously homework. You even posted the question numbers.

    For help of this kind, you have to show what you tried that didn't work rather than have any of us do...

Viewing 15 posts - 21,076 through 21,090 (of 22,184 total)