Forum Replies Created

Viewing 15 posts - 181 through 195 (of 1,228 total)

  • RE: UNION ALL Statement hangs engine

    artisticcheese (9/9/2014)


    I can not rewrite the query since this query is code generated from third party packaged application. I can created indexes/update statistics etc but not much abount actual code...

  • RE: UNION ALL Statement hangs engine

    artisticcheese (9/9/2014)


    I narrowed down the issue to statistics, updating statistics on 3 tables used in quyery query complete immediately. No index rebuild necessary.

    Estimated execution plan before statistics was updated and...

  • RE: UNION ALL Statement hangs engine

    artisticcheese (9/9/2014)


    Hello,

    I have TSQL query using UNION ALL. First subset returns 92 rows, second subset return 0 (ZERO) rows. Now if I execute them separately they execute subsecond. If I...

  • RE: SQL import data when both source and destination has data and identity column

    IT researcher (9/9/2014)


    patrickmcginnis59 10839 (9/8/2014)


    Talib123 (9/8/2014)


    Do it via T-sql and set identity insert on

    -- SET IDENTITY_INSERT to ON.

    SET IDENTITY_INSERT products ON

    GO

    It really sounds like he tried this, but...

  • RE: using linked server object name in join statements, a best practice?

    polkadot (8/31/2014)


    Now the DB_2 is moved to another server, SRV_B, the LSRV_A would have to be changed to point to SRV_B etc.,

    Yes, and that's his point. That if a lot...

  • RE: Query Help

    JackTimber (8/28/2014)


    Naa re, its a different asignment. I am working by keeping ChrisM solution as a base from previous example, and lets see.

    If i come up with a solution would...

  • RE: Need Help - SQL Select Statement

    keshabsingh (8/27/2014)


    Thanks Eirikur Eiriksson!.

    Your attempt is not bad. The approaches other users presented are more robust and accurate. Thanks anyway.

    Measuring and comparing the relative properties of different queries - even...

  • RE: Need Help - SQL Select Statement

    Lynn Pettis (8/27/2014)


    Why did people post code? It would have been nice to see what the OP had tried first since this looks like homework even though the OP...

  • RE: View or Function not updateable error with DELETE and CTEs

    The full syntax for DELETE should make this more clear:

    DELETE FROM PL2

    FROM dbo.PRE_LOAD PL1 JOIN (

  • RE: Need unique number for groups of records

    Eirikur Eiriksson (8/25/2014)


    Lynn Pettis (8/25/2014)


    rwaring 96203 (8/25/2014)


    I am definitely no expert, but in my (25-year) career I see a big difference between those who write books about coding versus those...

  • RE: Compare two columns

    I'll post it up when I get back from lunch 🙂

  • RE: Display ALL rows even if no data exists

    pwalter83 (8/8/2014)


    ChrisM@Work (8/7/2014)


    I don't see any parameters in your code, Paul.

    Any ideas, Chris ??[/quote

    Hi Paul, I'm on break in Normandy with no access to SQL Server until tuesday. A question...

  • RE: Cross Join Help

    dwilliscp (7/25/2014)


    I have a massive table (company, plant, resource, part number) that I need to create a from part number, to part number for every part within "Company, Plant, Resource"...

  • RE: SQL procedure Query Performance issue

    Two remote queries - same remote server and db - are performed separately then the results from each are joined at the local server:

    -- remote query

    SELECT "Tbl1005"."RNC" "Col1960","Tbl1005"."RBS" "Col1961","Tbl1005"."Sector" "Col1962","Tbl1005"."DCVECTOR_INDEX"...

  • RE: Insert sequence number

    @wBob, you might find a TOP() -limited IBG-style inline tally even more efficient.

Viewing 15 posts - 181 through 195 (of 1,228 total)