Forum Replies Created

Viewing 15 posts - 196 through 210 (of 2,006 total)

  • RE: CTE

    PRR.DB (9/25/2013)


    That will fail, but i would like to know,...

  • RE: Ignore Error in T-SQL

    C.K.Shaiju (9/24/2013)


    Hi,

    How do we ignore an error in T-SQL?

    For e.g.:- The following code throw an error once the @lCounter reach at 15 and will come out. Requirement is it...

  • RE: select query not working

    One of these queries may help.

    --== Locks held in database ==--

    SELECT request_session_id AS [spid], DB_NAME(resource_database_id) AS [dbname],

    CASE WHEN resource_type = 'OBJECT' THEN OBJECT_NAME(resource_associated_entity_id)

    WHEN resource_associated_entity_id...

  • RE: Query Execution Slow and Fast find the difference

    mouthbow (9/24/2013)


    I have removed "dbo.Centros.CodigoEmpresa = emp.CodigoEmpresa" and now works good but I'm not really sure about the consequences

    SELECT dbo.CabecerasFacturas.CodigoEpisodio

    FROM ...

  • RE: Query Execution Slow and Fast find the difference

    This is just for information purposes. . .

    "Slow" Query Definition

    SELECT cabe.CodigoEpisodio

    FROM dbo.CabecerasFacturas AS cabe

    RIGHT JOIN dbo.Historias AS hist

    INNER JOIN dbo.Episodios AS epis ON hist.CodigoHistoria = epis.CodigoHistoria

    INNER JOIN dbo.Centros ON epis.CodigoCentro...

  • RE: subtract from two tables

    dwain.c (9/23/2013)


    Perhaps this works also?

    Definitely, but I suspect that the point of the homework assignment is to learn about outer joins. The question now of course becomes, which is faster...

  • RE: subtract from two tables

    This looks a little bit like homework.

    First, let's set up your sample data so that people can use it: -

    DECLARE @Store_Out_Details AS TABLE (PurchaseOrderNo CHAR(3), SerialNo CHAR(4), Qty INT);

    INSERT INTO...

  • RE: Eliminate Cursor

    ChrisM@Work (8/21/2013)


    Now that was a great presentation. Watch and enjoy the show, Kapil, and work through a few examples.

    I enjoyed it, found some of the questions in the audience to...

  • RE: Eliminate Cursor

    kapil_kk (8/21/2013)


    Yes, I have used MERGE before but not in much depth like this....

    USING (SELECT a,b,c

    FROM @tblTempTable) [Source](a,b,[bit]) ON [Target].AccountOfficeId = [Source].a...

  • RE: Eliminate Cursor

    kapil_kk (8/21/2013)


    Can anyone tell me from where I can learn about this SET Based approaches?

    Aw man, that is a loaded question. Books, blogs, BOL and practise would be my answer.

  • RE: Eliminate Cursor

    kapil_kk (8/21/2013)


    Cadavre (8/21/2013)


    kapil_kk (8/21/2013)


    Koen Verbeeck (8/21/2013)


    Sure. This is one of the examples where you don't need a tally table.

    You can replace the logic beneath @bit = 1 with one MERGE...

  • RE: Eliminate Cursor

    kapil_kk (8/21/2013)


    Koen Verbeeck (8/21/2013)


    Sure. This is one of the examples where you don't need a tally table.

    You can replace the logic beneath @bit = 1 with one MERGE statement.

    The logic...

  • RE: Eliminate Cursor

    I'd do something like this: -

    MERGE INTO table1 [Target]

    USING (SELECT a,b,c

    FROM @tblTempTable) [Source](a,b,[bit]) ON [Target].AccountOfficeId = [Source].a AND

    ...

  • RE: Maximum row size of 8060

    HowardW (8/19/2013)


    Personally, I'd label this as a bug and it's quite annoying, but I believe this happens because of the large data types in row optimisation.

    If the original data was...

Viewing 15 posts - 196 through 210 (of 2,006 total)