whats the alternate

  • Dear Experts

    Can any one tell me whats the alternative in the SQL SERVER of the GREATEST function of ORACLE/ Pl Sql !

    like in oracle we have the function !

    select greatest (2, 5, 12, 3) from dual

    would return 12

    Please guide me !!!!

     

     

    - Manish

  • I don't know of any built in function but there are a number of user defined functions mentioned on this site and in the faq that parse a delimited list and return a "table".  Here's one: http://qa.sqlservercentral.com/scripts/contributions/319.asp

    It will allow you to pass a delimited list to the function and you can select from the resulting table like:

    Select max(item) from fn_ParseList(@List)

  • Hi ron_K

    Thanks a millions i got what i was required !

    and thanks to madhusudan also who had created this function !

    - Manish

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply