[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to generate a data dictionary of Sybase Views?

Posted on 2012-09-20
3
Medium Priority
?
594 Views
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?
0
Comment
Question by:lgallion
  • 2
3 Comments
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 2000 total points
ID: 38420198
"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. :)
0
 

Author Comment

by:lgallion
ID: 38420215
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?
0
 
LVL 24

Assisted Solution

by:Joe Woodhouse
Joe Woodhouse earned 2000 total points
ID: 38420221
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.)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the below post we have mentioned the best hosting type for startups. Also, check out some of the superlative web hosting companies that are proposing affordable web hosting solutions to host your startup website.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Loops Section Overview
Suggested Courses
Course of the Month18 days, 1 hour left to enroll

829 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