Forum Replies Created

Viewing 15 posts - 46 through 60 (of 429 total)

  • RE: SUM Not working

    Your table F07FcstSlsRepDomesticTbl_tmp may be haing these columns.

    CrntSubFcst,F06Flag, S07Flag, F07Flag

    Avoide these in group by and you should be okay.

  • RE: Basic Data conversion doubt

    Thanks Sergy.

    I was trying all data types and just found Real and float works.

  • RE: Select top groups

    Thanks a million Jeff and PW. That was really very helpful.

  • RE: Select top groups

    It is SQL2K.

  • RE: Minimum of top two values

    Thanks David. Good idea. I will use your idea.

    I did like this which almost solved my work.

    SELECT A.ItemName, A.ItemValue

    FROM

     @MyTable A

    JOIN

     (

     SELECT ItemName, MAX(ItemValue) ItemValue

     FROM

      @MyTable

     GROUP BY ItemName) B

    ON

     A.ItemName = B.ItemName

    AND A.ItemValue = B.ItemValue

    GROUP BY...

  • RE: Minimum of top two values

    First items are not stored any where.

    I have data like  gave in the sample. And I have to get a result set as I mentioned in the original post.

    To be...

  • RE: Minimum of top two values

    Sergiy

    ItemValue is the deciding factor here. I have to select the second highest value for each item. I can do that.

    Where I am getting stuck is if highest value is shared...

  • RE: Minimum of top two values

    Item Number does not matter.

    It is like recruitng top student from each class(Item). (First one is already gone so take second). If all the students scored same any one.

  • RE: Return MAX(COUNT(Column)) value

    I have to wait for about an year (hope) to use CTE.

    Remi 10 minutes took 4 days for you. I was wondering at that point no one even read the...

  • RE: MIN() and MAX() issues

    I have similar table with int column clustered index and date column non clusterd index with about 5 million rows. With are without date criteria it returns data in millseconds.

    And...

  • RE: Return MAX(COUNT(Column)) value

    I don't believe this so for no one even read this post. No one like Remi is hanging around any more??

    I did it like this. I would like to know...

  • RE: Selective Inner join

    Thanks Vldan. That answered my question.

     

  • RE: Selective Inner join

    Sorry. That was copy paste problem.

    Contact ID is primary Key.

    Data corrected in original post.

  • RE: The dreaded != operator

    I never like to use IN or NOT IN. I will try to avoid it following way. This aprocah always helped me to improve the performance.

    SET NOCOUNT ON

    DECLARE @MainTable TABLE

    (

    MyValue...

  • RE: Summary of Counts

    Sorry I did not check the code before posting. Good you figured it 

    HTH.

Viewing 15 posts - 46 through 60 (of 429 total)