> But that field did not returned the whole body of the udf.
Return to where, Query yzer, EM, some 3rd party app? Did you try
DATALENGTH() instead of LEN()? Are you sure that you have maximized the
output pane of Query yzer (see http://www.aspfaq.com/2272)?
The information_schema.routines view holds a maximum datalength of 8000
bytes for the definition of a proc or udf. So, if you really, really,
really need to have a UDF that exceeds this limitation, *and* you really
need to later retrieve that programmatically, you'll have to deal with the
multiple rows coming back from a query against syscomments:
WHERE id = OBJECT_ID('functionName')
ORDER BY colid
Please do not rely on this methodology in production code, as the system
tables' structure, functionality, and even existence is likely to change in
a future version of SQL Server, and this change will break your code when