Forum Replies Created

Viewing 15 posts - 991 through 1,005 (of 1,491 total)

  • RE: Why would the use of COALESCE on an INNER JOIN result in faster execution?

    COALESCE can be used as a general query hint. (ie Non tsql specific.)

    You should look a the query plans to see what is going on.

    In this case putting a function...

  • RE: Need the join sql

    SELECT A.Id

    FROM TableA A

    WHERE NOT EXISTS

    (

    SELECT *

    FROM TableB B

    WHERE B.Id = A.Id

    )

    or

    SELECT A.Id

    FROM TableA A

    LEFT JOIN TableB B

    ON A.Id = B.Id

    WHERE B.Id IS NULL

  • RE: Intra-query parallelism

    Or you could re-write the view to avoid the problem:

    CREATE VIEW TODOS2

    AS

    SELECT A.rgt, A.codctt, D.CIF, D.morada, D.dta_alteracao, D.bictb

    FROM allt AS A

    JOIN

    (

    SELECT B1.codctb, B1.CIF, B1.morada, B1.dta_alteracao, B1.bictb

    FROM contribuintesest AS B1

    UNION ALL

    SELECT...

  • RE: Users are blocked when access same row using XLOCK

    Glad to be of help.

    If this is an internet application it is common practice to assign each user an uniqueidentifier and use the NEWID() function.

    If you really want an integer,...

  • RE: Users are blocked when access same row using XLOCK

    musab (3/26/2009)


    Please suggest me some solution.

    I have.

  • RE: Dynamic SQL

    Use sp_executesql as it does not require you to convert any parameters to strings.

  • RE: Users are blocked when access same row using XLOCK

    It may be best if you re-think your design.

    If you really want to do this then:

    1. Less Blocking

    DECLARE @Counter int

    -- No need for explicit transactions

    UPDATE CounterTable

    SET @Counter = Counter =...

  • RE: Update int field with Datediff in subquery?

    You may also like to try OUTER APPLY.

    If you have a large amount of data, I would be interested in knowing if it is quicker than Chris's solution:

    UPDATE M

    SET M.DaysSinceLastRun

    =...

  • RE: check column consistency

    Tables have no order so the only way I can see of ordering you data is by Col1, Col2.

    (ie 1,4 will come before 1,11)

    If this is OK, then something like...

  • RE: Microsoft Documentation

    The problem has been solved by re-booting the machine.

    I am feeling particularly dense today – more coffee required.

    Thanks for you help.

    Ken

  • RE: Microsoft Documentation

    Hi Brandie,

    Thanks for the info.

    Unfortunately Local Help was already checked. I tried removing and re-adding it to no avail.

    I will have to look into this in more detail tomorrow -...

  • RE: Microsoft Documentation

    Thanks for the replies.

    Please could you explain how to enable local help?

    My development machine does not have internet access. I have not changed anything on it recently although I am...

  • RE: Facing Query OutPut Performance problem using view

    Why not just pass name to your function? The function will then not need to do a lookup.

  • RE: Split Time Records

    You should derive the shifts from a Calendar table and then join to your data.

    (Look up Calendar table on this site)

    For simplicity I have just used a shifts table here:

    DECLARE...

  • RE: Performance Problem

    Also, are there any user defined functions in the query?

Viewing 15 posts - 991 through 1,005 (of 1,491 total)