• ashok_raja (3/2/2010)


    Hi,

    Actually 46 will not be there as the next row will be for different ID

    i.e

    Insert into dr_temp(ID,Code,Value,Volume) Values(

    2,'120',31,2311)

    if present then Yes! it matches, I think Let's get the 1st match

    B/w 106886 and 380683. Is this Possible.

    Thanks

    Yes.

    Do you have a clustered index on your table and if yes, what columns are included?

    Is there any correlation between the clustered index and the volume column? (eg. if I sort the table based on the clustered index column, will the values for the volume column per ID be in order as well?)



    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]