Forum Replies Created

Viewing 15 posts - 42,481 through 42,495 (of 49,566 total)

  • RE: Are the posted questions getting worse?

    Matt Miller (12/9/2008)


    while (@i<50000)

    BEGIN

    SELECT *

    Into #tempTable

    from MyHumongousTable --1,750,000 rows

    update MyNewTable

    set...

  • RE: Query Help Please

    Mike Feuti (12/9/2008)


    O

    --===== Insert the test data into the test table

    INSERT INTO #test

    (ID, email)

    SELECT '10002','Walton@email.chop.edu' UNION ALL

    SELECT '10004','craig.engstrom@wfhc.org' UNION ALL

    SELECT...

  • RE: Are the posted questions getting worse?

    I still think my favourite has to be this piece of code that I found when one of the devs complained that the dev server was very slow. The same...

  • RE: Query Help Please

    Mike Feuti (12/9/2008)


    I think I have what you need now.

    Almost. Just need the create statement for the two temp tables please.

  • RE: Query Help Please

    Mike Feuti (12/9/2008)


    Ok I'm fairly new at this but I'm trying.

    That's fine.

    I've edited the data you posted so that it looks the way we generally want it. Do you...

  • RE: Slow function

    pino_daddy (12/9/2008)


    The function is used to convert whatever time is being retrieved from whatever table it is being retrieved from. I was just wondering if there was a better way...

  • RE: Certain Number of rows before SQL will use an index ?

    TheSQLGuru (12/9/2008)


    1) I wonder if that was actual rows returned or estimated?

    Estimated. The optimiser works with estimated row counts and that's what it uses for its costings and plan....

  • RE: Slow function

    Grant did say it was untested. There's a misplaced bracket in the dateadd function.

    SELECT s.ROW_ID, DATEADD(MINUTE,ISNULL(x.UTC_OFFSET,0),s.Created)

    FROM S_SRV_REQ S

    LEFT JOIN (SELECT TOP 1 tt.UTC_OFFSET, TT.START_DT

    FROM S_TIMEZONE T

    JOIN S_TIMEZONE_TEMP TT

    ON T.ROW_ID =...

  • RE: Slow function

    pino_daddy (12/9/2008)


    Want to know how to speed up the function. Rewite it better? Different code for the function, etc.

    Remove it?

    The way that SQL runs UDFs means that the...

  • RE: Reading code of stored procedure

    Grant them view definition on the procedures, or on the entire dbo schema (but that will give them rights to see the definitions of tables, views, functions, etc as well)

    GRANT...

  • RE: Query Help Please

    Please post table definitions, sample data and desired output.

    Read this to see the best way to post this to get quick responses. http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • RE: To Know fragmentation?

    kotlas7 (12/9/2008)


    - Logical Scan Fragmentation ..................: 2.31%

    For an index, that's the most important one. Extent fragmentation is less important but should still be kept low.

  • RE: SQl Server 2005/2008

    If you have no experience with SQL 2008, then don't write the 2008 exams. They're not that much more difficult than the 2005 ones, but they do require that you...

  • RE: Job fail: The log file for database[DB] is full.

    Debbie Edwards (12/9/2008)


    at the beginning of the script Ive got DBCC SHRINKDATABASE (MyDatabase, 20);

    Why?

    Is the entire job running within a transaction? Logs can only be truncated to the beginning of...

  • RE: Corrupt DB -repair or restore

    Paul will probably be along in a few hours. Or he might be on vacation.

    Restore is always the preferred option. Repair is, in most cases, for when you can't restore...

Viewing 15 posts - 42,481 through 42,495 (of 49,566 total)