Forum Replies Created

Viewing 15 posts - 4,306 through 4,320 (of 10,144 total)

  • RE: Conditional Join

    deepkt (7/23/2013)


    Thanks for the reply, IF/ELSE is straight forward I know this.

    But I want in a single select/Update statement.

    Why? It will be inelegant and unwieldy, and confusing for whoever inherits...

  • RE: SP vs Identical T-SQL - different results

    Rob-350472 (7/23/2013)


    There are very subtle differencs in the Exceution plans between the SP and the code, however, they are different.

    Can you post them? The Actual plans?

    Do you have TOP without...

  • RE: Query taking non-consistent time to execute

    This simple query will always run as a table (or index) scan. How long it takes to complete will depend upon quite a few factors and some of these are...

  • RE: Conditional Join

    IF EXISTS(SELECT 1 FROM TableB)

    update data in TableA with TableB

    ELSE

    update data in TableA with TableC

  • RE: Query taking non-consistent time to execute

    -- why cast [Phone no] AS VARCHAR(MAX)?

    -- why use CHARINDEX? You don't need the character position, you only need to know if

    -- one string exists inside the other.

    SELECT [customer].[Customer...

  • RE: Execution Plan Changes With "TOP 1" And problem with the response time

    nailosuper (7/23/2013)


    Hi ChrisM@Work,

    I changed my query and verified(made some modifications) the indexes as the others said. So i could avoid the table spool, and i have the response in...

  • RE: How to find ladder in sql query

    drop TABLE #Temp

    CREATE TABLE #Temp (col1 INT)

    INSERT INTO #Temp (col1) VALUES (5),(10),(15),(20)

    ;WITH SequencedData AS (SELECT col1, seq = ROW_NUMBER() OVER(ORDER BY col1) FROM #Temp)

    SELECT

    tr.col1,

    col2 = ISNULL(nr.col1-1,24)

    FROM...

  • RE: Hiring Heterogeneously

    "Not everyone can be a superstar-expert-architect that decides how the system is built. Not all architects should spend time coding basic insert/update/delete code or adding clustered indexes to tables. We...

  • RE: Are the posted questions getting worse?

    mister.magoo (7/22/2013)


    dwain.c (7/22/2013)


    L' Eomot Inversé (7/22/2013)


    Sean Lange (7/22/2013)


    Gosh Tom, how do you really feel about that article??? :w00t:

    Just as described, but if I'd realised who wrote it I would have...

  • RE: Are the posted questions getting worse?

    L' Eomot Inversé (7/22/2013)


    dwain.c (7/17/2013)


    Brandie Tarvin (7/17/2013)


    WHOO HOO!

    Not only did I just teach myself how to use MERGE (never had time or reason), but I managed to use it correctly...

  • RE: Create a view with a self populating column

    or this?

    select Date, Item, Sales, db_NAME() as SomeColumn

    from SomeTable

  • RE: Execution Plan Changes With "TOP 1" And problem with the response time

    nailosuper (7/22/2013)


    Hi ChrisM@Work,

    I think, i didn't really understand howto and why replace with ROW_NUMBER() . Can you just explain a bit?

    Your person and email tables are...

  • RE: IF ELSE Query

    Voide (7/19/2013)


    To obtain data from a stored procedure you need to have a select. ...[/code]

    The OUTPUT clause of a DELETE will do just fine 😉

  • RE: Execution Plan Changes With "TOP 1" And problem with the response time

    The view is a strange mix of naive coding (determined by the very inefficient subquery and suggestions that the view was created using a query designer) and index hints, which...

  • RE: Date convertion

    karunakar2351 (7/22/2013)


    The datatype of the column is varchar(50)

    Why? That's a question for you to ask, not answer. Are there any benefits at all in having this column typed as string...

Viewing 15 posts - 4,306 through 4,320 (of 10,144 total)