Forum Replies Created

Viewing 15 posts - 1 through 15 (of 36 total)

  • RE: Returning the Top X row for each group

    A nice quest! I like the solution for its clever use of the index.

    However, you depend on a table to deliver the lookup-values for the age-column (in this case master..spt_values...

  • RE: select and update table

    manojkanoi,

    I can't do the complete job for you, but here's a suggestion how to construct an UPDATE...FROM query in general:

    update ProductAlias

    set .....

    FROM Products ProductAlias

    inner join SalesTotalTemp

    RIGHT OUTER JOIN SeqNumberTemp ON...

  • RE: higher reads when using ADO.NET thatn when using Query Analyzer

    I have seen a similar behaviour caused by different locking strategies. It's sometimes not clear to me, why SQL server uses row-level locking or page-level or table-level-locking, but sometimes a...

  • RE: Simple But Serious - Please Help

    It's not clear to me what you're trying to achieve. Pls explain or post some code.

    Obviously you're using a cursor (there is a FETCH). Why not

       INSERT target_table SELECT...

  • RE: Tricky date range check in SQL

    Thank you everybody for your support in this matter.

    @aj Ahrens: Your Loop is nice, but has performance disadvantages. In addition, I would have to add some logic to...

  • RE: Tricky date range check in SQL

    OK, stupid me, here's a first shot. Does anybody have anything better ? shorter? faster ?

    declare @STARTDATE datetime

    declare @ENDDATE datetime

    select @STARTDATE ='1.1.2004' , @ENDDATE='31.1.2004'

    if...

  • RE: timeout expired

    How do you connect? What's your connection string ? Do you also get timeouts in Query Analyzer when accessing the same records as your app ?

    To me it sounds like...

  • RE: MS profiler Lock:Released events behavior

    It's a tricky question and I don't have a real answer for you, but to me it looks like SQL Profiler reports two types of locks to you: "real" locks and...

  • RE: Server chooses different locktype

    Good idea, but it did not change the server's behavior.

    I have checked the query plan - it is identical. Both DBs run in the same SQL Server instance on a single...

  • RE: Query Analyzer slow and spor attic

    I would also try "TCP" instead of "named pipes". And check the virus scanner on the server to make sure it doesn't block anything. Maybe exclude the SQL server directories...

  • RE: MSDB inconsistent

    Yes, we do have a daily backup. But I don't know when the inconsistency was introduced and I would have to go back month by month until I find a...

  • RE: How to convert vertical records to horizontal?

    if ProductID is a char, then try this:

    declare @string_var varchar(255)

    select @string_var = ""

    select @string_var = @string_var + ProductID from tbl_a

    print  @string_var

    When I first saw this, I could't believe...

  • RE: Missing Locking mechanism?

    Does any of these offer a snapshot ?

    Not as far as I know them - "READ UNCOMMITTED" reads everything, even stuff that's only half way through, and the other three (READ...

  • RE: no parallelism for parallel users?

    > Even when different users run queries on different databases, stored on different hard drives

    So it can not be Harddisk I/O. My disks are not accessed that much either....

  • RE: Long executive plan, long compile? Why?

    OK, it may sound a little weird, but how about the following experiment: shrink the ORPostDetail table so it doesn't contain 150 Million rows but maybe just a few hundred...

Viewing 15 posts - 1 through 15 (of 36 total)