How to generate a data dictionary of Sybase Views?

Posted on 2012-09-20
Last Modified: 2012-09-29
It is pretty easy to list a list of fields from Sybase tables but all of the data I am trying to access (I am a lowly user and not an admin) is represented as views.  How can I get a list of view names and the field names (and perhaps field types) within those views?
Question by:lgallion
    LVL 24

    Accepted Solution

    "sp_help" without any arguments will show you all objects, which will include views.

    "sp_help [view name]" will show you the view definitions.

    All this information is pulled out of system tables but rather than give you complicated SQL you may not have permissions to run, use the built-ins. :)

    Author Comment

    Unfortunately all the sp_help viewname shows is a single line with Name, Owner, Object_type and Create_date of the specified viewname like:

    XYZView     dbo    view   June 23, 2011

    Perhaps the command is limited or the version of the db old.  Is there a sql query I could try?
    LVL 24

    Assisted Solution

    by:Joe Woodhouse
    Oh! You'll need "sp_helptext [viewname]" for the underlying SQL.

    (Syntax might differ - you haven't told us which Sybase database product you're using.)

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now