Just be aware that multi-statement table valued functions tend to perform less then admirably, especially if they'll be returning lots of rows.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability