Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to view entire definition of function from Query Analyzer 1

Status
Not open for further replies.

bbCincinnati

Programmer
Aug 21, 2008
14
US
Hi Folks,

I'm trying to view the definition of a (user defined) function from Query Analyzer. The following statement works well, but the text in the 'definition' column is truncated to maybe 254 characters.

SELECT name, definition
FROM sys.sql_modules AS m
INNER JOIN sys.objects AS o ON m.object_id = o.object_id
WHERE name = 'my_function'

Is there a better way to view the definition of a function from Query Analyzer?

Thank you
 
I don't have query analyzer installed anymore, so I can't tell you exactly what to click on. but....

Click Tools -> Options
Click on the results tab
Set 'Maximum characters per column' to something larger (like 8000).



-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Can you just modify this function instead to view its code?
 
Hi George,

Thanks so much for your post. That was exactly what I needed. Sorry it took me a month to reply. The notification got caught in my spam filter :eek:(
 
Hi Markros,

Thanks for your response. Sorry it took a month to reply. I'm set now :eek:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top