Forum Replies Created

Viewing 15 posts - 48,061 through 48,075 (of 49,571 total)

  • RE: LIghter fare - Doh! Querys

    One of the best I saw at a previous company.

    SELECT ... FROM SomeTable WHERE SomeColumn = @Var and Status = 1 or status = 2

    Just like that, no brackets. Even...

  • RE: alter a column to Identity

    What error do you get?

  • RE: FASTFIRSTROW hint

    Megha Yadav (12/12/2007)[hr

    In this case the @tempUserID is being used in the next few queries. In this case there will be not even the seemingly less response time Am...

  • RE: Statistics Update

    Generally statistics are automatically updated by SQL server. The only time it's necessary to update them manually is when the auto update is disabled (which it should never be) or...

  • RE: EXISTS does not work with INSERT

    Edit: Cross-post...

    SQL doesn't insert one row at a time. It inserts the entire batch at once The Where clause (with exists) executes before the insert occurs. The operations in the...

  • RE: check my query plz and help me

    Easiest way to do that is with a numbers table. It's a very handly thing for a lot of problems. I'm creating a temp numbers table, but you can create...

  • RE: EXISTS does not work with INSERT

    Your PK is on CustID?

    At the point that the exists runs, the row

    01 Phil_1

    is not in Table1, hence the second row twith aa 01 id si not filtered out.

    The distinct...

  • RE: check query (related to prev post)

    No need to start a new thread for this problem. It will just fragment replies and waste people's time.

    Continue here, please

  • RE: SP execution plan

    As an alternative to the variables, may I suggest creating the proc WITH RECOMPILE so that each execution gets the optimal plan. It will completely eliminate parameter sniffiing.

    With variables, while...

  • RE: UK JOB & US JOB

    Bear in mind that you'll need a work permit to work in either country.

  • RE: SP execution plan

    In theory, and providing there are no temp tables involved, yes.

    I know 2005 when you do an estimated plan, fetched the plan from the cache it it's there. I haven't...

  • RE: I'm sick of poor third-party software performance

    Jeff Moden (12/12/2007)


    No, no... the rant is understood and appreciated. When I first reported to my company, they had and average of 640 deadlocks a day with spikes to...

  • RE: difference between Len() and DataLength()

    Depends what you want. I doubt there's much of a performance difference, if any.

    Ifyou want the number of characters in the string, except trailing spaces, use LEN. If you what...

  • RE: select data between 2 periods

    With an appropriate index*, the first 2 can do an index seek to get the data. The third, since it has functions applied to the columns, will do at best...

  • RE: SP execution plan

    Paste the call to the proc in QA and run it with the exec plan on. It should give you back the same plan as from whatever app its called...

Viewing 15 posts - 48,061 through 48,075 (of 49,571 total)