It seems the only place to get this is syscomments ... here is a sample of how you might go about that ...drop table #paramsdrop proc testgocreate proc test @x int = 1, @y int = 2asselect 'blah'godeclare @csv varchar(8000), @sep char(1)select @sep = ',', @csv = replace(replace( substring(sc.text, charindex('@',sc.text), charindex('as',sc.text) - charindex('@',sc.text)),char(10),''),char(13),'')from dbo.sysobjects so inner join dbo.syscomments sc on so.id = sc.idwhere so.name = 'test' and so.xtype = 'p'select ltrim(rtrim(nullif(substring(@sep+@csv+@sep,n,charindex(@sep,@sep+@csv+@sep,n)-n),''))) as wordinto #paramsfrom numbers --this is a tally table: create table numbers(n int) -> fill with 1 to n sequential positive ints ....where n<=len(@sep+@csv+@sep) and substring(@sep+@csv+@sep,n-datalength(@sep),datalength(@sep))=@sep and charindex(@sep,@sep+@csv+@sep,n)-n>0select left(word,charindex(' ',word)) as parameter, right(word,datalength(word) - charindex('=',word) - 1) as [default]from #params EDIT:
this cracks me up!!! I find this solution very very funny for some reason ...Jay White{0}Edited by - Page47 on 10/23/2002 14:26:16