Home Forums SQL Server 7,2000 T-SQL table variable in a table-valued function RE: table variable in a table-valued function

  • function parameters are not optional the way stored procedures are. All values must be passed, or the default placehodler must be used in it's place

    you have to use the default keyword if you wnat to skip the value:

    not allowed:

    SELECT * FROM new_function ()

    the way the default value must be called instead:

    SELECT * FROM new_function (default)

    SELECT * FROM new_function ('MISSED')

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!