Forum Replies Created

Viewing 15 posts - 1,426 through 1,440 (of 5,502 total)

  • RE: Possible problem with statistics ???

    sqlnaive (6/2/2011)


    Ninja, Updating the stats with 20% may faten the process. However In our scenario, it may not resolve the issue entirely. There are two points:

    1. The entire dataset on...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: need summarized info in the sql join queries

    Arrgghhh!!!

    I'm sorry. I didn't look at the original query close enough to spt that it is grouped by a different column than used in the SELECt list.

    Here's the revised version:

    SELECT...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Select distinct rows

    Using your original sample:

    A1 432 1/1/11

    A2 453 1/1/11

    A1 555 1/1/11

    A1 653 1/1/10

    A4 875 1/1/09

    Both rows have the same part_no and the same calc_date, but different calc_values. Which one would you...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: UAT Testing and reverting back committed transcation

    Backup and restore?

    Meaning: take a backup of the db before starting the tests and restore from backup once the tests are completed.

    Question aside: why do you have to revert to...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Select distinct rows

    Glad I could help 😀

    Just make sure you'll never have duplicate date values per datetime column. A unique check constraint would help a lot here.

    You might also rethink the column...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: need summarized info in the sql join queries

    Regarding the syntax error: WHERE needs to be placed before GROUP BY

    SELECT P.MAKER,AVG(L.SCREEN) AS AliasColumnNameGoesHere

    FROM PRODUCT P

    INNER JOIN LAPTOP L

    ON P.MODEL = L.MODEL

    WHERE P.MAKER = 'LAPTOP'

    GROUP BY P.MODEL

    But I'd...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Select distinct rows

    remove the parenthesis around the SELECT statement after insert into tbl_weighcalc(.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: SQL 2008 Error - Trigger Error

    banthis is a table in the same database where the [tb_inspiration] is located.

    Obvioulsy, you tried to insert a value that exists in the phrase column of the banthis table. My...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Select distinct rows

    All you need to do is to adjust the table and column names.

    The INSERT INTO approach will work as long as the table you're tryingto insert already exist. Otherwise you'd...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Finding maximum value out of 5 different columns

    Why don't you add a computed (persisted) column with a CASE statement expression ( 😉 ) returning the max value you're looking for?

    You could also use UNPIVOT against the...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Select distinct rows

    Something like this?

    -- sample data setup

    CREATE TABLE #temp

    (

    part_number CHAR(2) ,

    value_ INT ,

    Date_ DATETIME

    )

    INSERT INTO #temp

    SELECT 'A1', 432 ,'20110101' UNION ALL

    SELECT 'A2', 453 ,'20110101'...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Select distinct rows

    use the window where you typed your query and run the following query

    SELECT @@version

    The answer you provided is related to the operating system, not the SQL Server version... 😉



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: SSIS job error

    Straight from the link I posted before:

    option 1:

    changing the 'table or view fast load' to 'table or view' mode

    option 2:

    Make sure to check your source and destination steps that may...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Merging date ranges

    You might want to have a look at this blog. It will demonstrate an alternative solution that most probably will perform better than your current approach.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Select distinct rows

    Do you use SQL Server 2000 (as indicated by the forum you posted in) or another version? Makes a big difference regarding the solution for the ginven task.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 15 posts - 1,426 through 1,440 (of 5,502 total)