• Also, use proper types for your columns. Numeric values -like a salary- should not be entered as strings. If you store them as strings the values may not sort as you would expect. For example:

    select max(salary)

    from (

    select '20' as salary

    union all select '100'

    ) t

    The output of this is:

    ----

    20

    (1 row(s) affected)

    Probably not what you wanted, is it?



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?