Forum Replies Created

Viewing 15 posts - 241 through 255 (of 1,082 total)

  • RE: Select query runs forever in sql 2005

    did you try and update the stats like Grant mentioned. I'm very interested to know why different versions of sql are giving very different results

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Select query runs forever in sql 2005

    wow this is very strange....

    I've created two tables with with the columns in your query added data and indeed the query runs in secs if not milliseconds on 2000 and...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Select query runs forever in sql 2005

    hwo long did you say the 2005 query takes vs the sme query on 2000?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Select query runs forever in sql 2005

    mmm

    Please confirm if this is a double post or not?

    http://www.sqlservercentral.com/Forums/Topic694547-146-2.aspx?Update=1

    If it is then could the reason not be that your code is different.

    The one removes 0's and the other doesn't

    as...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Query performance problem after sql 2005 migration

    This is double post :

    http://www.sqlservercentral.com/Forums/Topic696401-149-1.aspx?Highlight=BIBNAC

    And to be honest those two queries are completely different.

    In that in the first one the optimizer could if it wanted use indexes.

    In the second query...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: How to use an OUTPUT parameter and check if a record exists

    I'm with Chris...

    Oh another thing is to maybe SET NOCOUNT ON at the beginning of the proc.

    This sounds wierd but I have seen some ASP and PHP code fall over...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Select query runs forever in sql 2005

    could you save the execution plans as .zip files and attach them.

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Views Vs Procedures

    could yo post some example code please?

    also if you time perhaps the two different execution plans 🙂

    Thanks

    Chris

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: How to use an OUTPUT parameter and check if a record exists

    why does .NET fall over when you have a return in your code?

    Thanks for the solution, just hoping for an explanation as well

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: How to use an OUTPUT parameter and check if a record exists

    the return was removed from within the if statement!

    Did that fix your problem?

    If it did I would be interested to know why?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: How to use an OUTPUT parameter and check if a record exists

    I think the OP wanted the return there so that no records are inserted...

    otherwise good move taking it out but that shouldn't change the nature of the output param should...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: How to use an OUTPUT parameter and check if a record exists

    There are a few things to check on the asp side as from what I can see you proc looks fine, other that if something doesn't exist then a null...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Searching a table for items entered before a specific time

    I normally always use this format 'YYYY-MM-DD'

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Select query runs forever in sql 2005

    As mentioned the UDF's are different, which means you comparing apples and oranges...

    Could you post the two UDF's and then we can let you know how to improve them, or...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: T-SQL Operators

    I don't think MDX is t-sql either

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life

Viewing 15 posts - 241 through 255 (of 1,082 total)