Stored Function Tables

  • Hi,

    If i am not wrong you are talking about the Table type functions, which returns the Multiple values like a table.

    as

    Create function fn_tbl(@val varchar) returns Table

    as

    begin

    end

     

    thanks,

    Amit

     

  • yes amit, i think so i am looking 4 this

    /**A strong positive mental attitude will create more miracles than any wonder drug**/

  • CREATE FUNCTION CustomersByContinent (@Continent varchar(30))

    RETURNS TABLE

    AS

    RETURN SELECT dbo.WhichContinent(Customers.Country) as continent, customers.*

    from customers

    where dbo.WhichContinent(Customers.Country) = @Continent

    GO

    --examples of Calling the function

    select * from CustomersbyContinent('North America')

    select * from CustomersByContinent('South America')

    select * from customersbyContinent('Unknown')

    ------------
    When you 've got a hammer, everything starts to look like a nail...

  • u guys r too funny.to search for the answer to my question,i had to read like a ton of explanations,comments etc. being thrown at each other!and then when i thought about what started it all off,i couldnt help but laugh.

    anyway,thanx for the help

     

  • Ha.. and mine

    |

Viewing 5 posts - 16 through 19 (of 19 total)

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