Forum Replies Created

Viewing 15 posts - 106 through 120 (of 172 total)

  • RE: data warehous key structure setup

    It is a data warehouse so I would guess there is already a 'structure' in place for foreign keys.

    If not...

    It will take multiple steps whether you use NewID() or identity....

  • RE: .net performance slow SSMS performance very good

    Thanks for the great link Rick.

    I had finally tracked the problem down (using trace) that the application sql was running an execution plan (@84) and the SSMS was using an...

  • RE: 2005 Management Studio connot connect to Remote Development Box

    Best guess is you do not have your development box configured to handle remote connections.

    GO into your configuration tools and check the allow remote access.

  • RE: Query with Mathematic function to sum number of fields with a certain status

    The ROLLUP below will work, however it breaks when additional columns (status.id) are added for ordering. Totalling should probably be a part of reporting not data retrival.

    create table #requests...

  • RE: Case statement Question

    Not sure on performance but you avoid the case statement below...

    select blah, blah

    from Alphabets

    WHERE (yourCOlumn = 'A' AND Letter IN ('A','E','I','O','U') )

    OR (yourColumn 'A' and letter in...

  • RE: use IDENTITY with seed and increment as variables

    CREATE TABLE #tmp(id int IDENTITY, other VARCHAR(100))

    INSERT INTO #tmp(other) VALUES ('1st value')

    DBCC checkident('#tmp', RESEED, 5)

    INSERT INTO #tmp(other) VALUES ('2nd value')

    DECLARE @aSeed INT

    SET @aSeed = 25

    DBCC checkident('#tmp', RESEED,...

  • RE: Select w/ Max

    WOW! So glad to read that post!

    ROW_NUMBER() is going eliminate so many derived tables for getting a max/min value and then joining to the original query.

    Example SQL Below

    UPDATE #assembly

    SET #assembly.assemblyStatusID...

  • RE: convert varchar to datetime, including time

    The data needs to be in a format SQLServer denotes as datetime.

    '200609151540' is not a datetime it is a string

    '20060915 15:40' is recognizable as a datetime string, with rules to...

  • RE: aggragate question

    The actual sproc was quite a bit more involved but I used the same type of logic below, specifically the case logic. I did not notice a performance hit.

    I...

  • RE: fastest way to run DELETE command

    a Move data you are keeping into a temp table

    truncate original

    restore temp into original table

    b break the data down into a reasonable count...

  • RE: programatically detemine VIEW source

    Either the sp_helptext or sp_depends will do grand!

    I will be creating a temp (or variable table) and checking the results to determine which way to switch the data and load...

  • RE: how to return a query''''s result set as the columns for another query

    If you know your columns before runtime you can create the temp table and then populate it with your target data.

    create table #tmpWorkShop (name varchar(100), id int)

    INSERT INTO #tmpWorkShop

    EXEC...

  • RE: MS Access 2003 link tables to SQL 2000

    When using an Access myDatabaseFrontEnd.adp form you may need to create a primay key on the SqlServer Table.

  • RE: TSQL Faster Than Stored Procedure?

    I have ran into similar performance gaps between a TSQL statement and a sproc.

    Run both queries in SSMS with actual execution plan. You should spot where the...

  • RE: Split Data into two fields

    For these migration type of needs it usually works good to have a multiple level attack.

    Create a tmp table with an identifying column (or two) the sourcefield Quad and the...

Viewing 15 posts - 106 through 120 (of 172 total)